Apache Portable Runtime Utility Library
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros
Hook probe capability
Hook Functions

Macros

#define APR_HOOK_INT_DCL_UD
#define APR_HOOK_PROBE_ENTRY(ud, ns, name, args)
#define APR_HOOK_PROBE_RETURN(ud, ns, name, rv, args)
#define APR_HOOK_PROBE_INVOKE(ud, ns, name, src, args)
#define APR_HOOK_PROBE_COMPLETE(ud, ns, name, src, rv, args)

Detailed Description

APR hooks provide a trace probe capability for capturing the flow of control and return values with hooks.

In order to use this facility, the application must define the symbol APR_HOOK_PROBES_ENABLED and the four APR_HOOK_PROBE_ macros described below before including apr_hooks.h in files that use the APR_IMPLEMENT_EXTERNAL_HOOK_* macros.

This probe facility is not provided for APR optional hooks.

Macro Definition Documentation

#define APR_HOOK_INT_DCL_UD

internal implementation detail to avoid the ud declaration when hook probes are not used

#define APR_HOOK_PROBE_COMPLETE (   ud,
  ns,
  name,
  src,
  rv,
  args 
)

User-defined hook probe macro that is invoked after calling a hook function.

Parameters
udA void * user data field that was filled in by the user- provided APR_HOOK_PROBE_ENTRY().
nsThe namespace prefix of the hook functions
nameThe name of the hook
srcThe value of apr_hook_debug_current at the time the function was hooked (usually the source file implementing the hook function).
rvThe return value of the hook function, or 0 if the hook is void.
argsThe argument list to the hook functions, with enclosing parens.
#define APR_HOOK_PROBE_ENTRY (   ud,
  ns,
  name,
  args 
)

User-defined hook probe macro that is invoked when the hook is run, before calling any hook functions.

Parameters
udA void * user data field that should be filled in by this macro, and will be provided to the other hook probe macros.
nsThe namespace prefix of the hook functions
nameThe name of the hook
argsThe argument list to the hook functions, with enclosing parens.
#define APR_HOOK_PROBE_INVOKE (   ud,
  ns,
  name,
  src,
  args 
)

User-defined hook probe macro that is invoked before calling a hook function.

Parameters
udA void * user data field that was filled in by the user- provided APR_HOOK_PROBE_ENTRY().
nsThe namespace prefix of the hook functions
nameThe name of the hook
srcThe value of apr_hook_debug_current at the time the function was hooked (usually the source file implementing the hook function).
argsThe argument list to the hook functions, with enclosing parens.
#define APR_HOOK_PROBE_RETURN (   ud,
  ns,
  name,
  rv,
  args 
)

User-defined hook probe macro that is invoked after the hook has run.

Parameters
udA void * user data field that was filled in by the user- provided APR_HOOK_PROBE_ENTRY().
nsThe namespace prefix of the hook functions
nameThe name of the hook
rvThe return value of the hook, or 0 if the hook is void.
argsThe argument list to the hook functions, with enclosing parens.