debug_tools_register_event_func

March 26, 2020 Contributors

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);

Parameters

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);

Return Values

This function returns void.

Threading

It is only legal to call this function in the Scheduler thread.