debug_tools_register_event_func
Name
debug_tools_register_event_func — Register an event function for debugging
Synopsis
#include "debug_tools.h"
| void **debug_tools_register_event_func** (
| fptr, | |
| | name, | |
| | type, | |
| | dumper)
; | |
EventFunc <var class="pdparam">fptr</var>
;
const char * <var class="pdparam">name</var>
;
const char * <var class="pdparam">type</var>
;
debug_tools_event_dumper <var class="pdparam">dumper</var>
;
Description
Register an event function for debugging.
The following macro may be helpful:
#define insert_func_details(a,b,c,d) debug_tools_register_event_func((EventFunc)a, b, c, d)
A sample call:
debug_tools_register_event_func(log_heartbeat, "log_hearbeat", "ec_logger", NULL);
- fptr
-
An
EventFunc
function pointer. The following typedef applies to this data type:typedef int (*EventFunc) (struct _Event * event, int eventtype, void *closure, struct timeval * now);
- name
-
Name of the event function.
- type
-
A type, such as a module name.
- dumper
-
A function pointer. The following typedef applies to this data type:
typedef void (*debug_tools_event_dumper)(string *output, Event *e);
This function returns void
.
It is only legal to call this function in the Scheduler
thread.