![]() |
The FreeRADIUS server $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
|
Wrapper around libkqueue to make managing events easier. More...
#include <freeradius-devel/util/timer.h>
#include <freeradius-devel/build.h>
#include <freeradius-devel/missing.h>
#include <freeradius-devel/util/time.h>
#include <freeradius-devel/util/talloc.h>
#include <stdbool.h>
#include <sys/event.h>
Go to the source code of this file.
Data Structures | |
union | fr_event_funcs_t |
Union of all filter functions. More... | |
struct | fr_event_io_func_t |
Callbacks for the FR_EVENT_FILTER_IO filter. More... | |
struct | fr_event_list_pub_s |
Public event list structure. More... | |
struct | fr_event_update_t |
Structure describing a modification to a filter's state. More... | |
struct | fr_event_vnode_func_t |
Callbacks for the FR_EVENT_FILTER_VNODE filter. More... | |
Macros | |
#define | EVENT_DEBUG(...) |
#define | fr_event_fd_insert(...) _fr_event_fd_insert(NDEBUG_LOCATION_EXP __VA_ARGS__) |
#define | fr_event_fd_mode(...) _fr_event_fd_move(NDEBUG_LOCATION_EXP __VA_ARGS__) |
#define | fr_event_filter_insert(...) _fr_event_filter_insert(NDEBUG_LOCATION_EXP __VA_ARGS__) |
#define | fr_event_filter_update(...) _fr_event_filter_update(NDEBUG_LOCATION_EXP __VA_ARGS__) |
#define | fr_event_pid_reap(...) _fr_event_pid_reap(NDEBUG_LOCATION_EXP __VA_ARGS__) |
#define | fr_event_pid_wait(...) _fr_event_pid_wait(NDEBUG_LOCATION_EXP __VA_ARGS__) |
#define | FR_EVENT_RESUME(_s, _f) { .offset = offsetof(_s, _f), .op = FR_EVENT_OP_RESUME } |
Re-add the filter for a func from kevent. | |
#define | FR_EVENT_SUSPEND(_s, _f) { .offset = offsetof(_s, _f), .op = FR_EVENT_OP_SUSPEND } |
Temporarily remove the filter for a func from kevent. | |
#define | fr_event_user_insert(_ctx, _ev_p, _el, _trigger, _callback, _uctx) _fr_event_user_insert(NDEBUG_LOCATION_EXP _ctx, _ev_p, _el, _trigger, _callback, _uctx) |
Typedefs | |
typedef void(* | fr_event_error_cb_t) (fr_event_list_t *el, int fd, int flags, int fd_errno, void *uctx) |
Called when an IO error event occurs on a file descriptor. | |
typedef void(* | fr_event_fd_cb_t) (fr_event_list_t *el, int fd, int flags, void *uctx) |
Called when an IO event occurs on a file descriptor. | |
typedef struct fr_event_fd | fr_event_fd_t |
An opaque file descriptor handle. | |
typedef struct fr_event_list_pub_s | fr_event_list_t |
typedef void(* | fr_event_pid_cb_t) (fr_event_list_t *el, pid_t pid, int status, void *uctx) |
Called when a child process has exited. | |
typedef struct fr_event_pid | fr_event_pid_t |
An opaque PID status handle. | |
typedef void(* | fr_event_post_cb_t) (fr_event_list_t *el, fr_time_t now, void *uctx) |
Called when a post event fires. | |
typedef int(* | fr_event_status_cb_t) (fr_time_t now, fr_time_delta_t wake, void *uctx) |
Called after each event loop cycle. | |
typedef void(* | fr_event_user_cb_t) (fr_event_list_t *el, void *uctx) |
Called when a user kevent occurs. | |
typedef struct fr_event_user_s | fr_event_user_t |
An opaque user event handle. | |
Enumerations | |
enum | fr_event_filter_t { FR_EVENT_FILTER_IO = 1 , FR_EVENT_FILTER_VNODE } |
The type of filter to install for an FD. More... | |
enum | fr_event_op_t { FR_EVENT_OP_SUSPEND = 1 , FR_EVENT_OP_RESUME } |
Operations to perform on filter. More... | |
Functions | |
int | _fr_event_fd_insert (NDEBUG_LOCATION_ARGS TALLOC_CTX *ctx, fr_event_fd_t **ef_out, fr_event_list_t *el, int fd, fr_event_fd_cb_t read_fn, fr_event_fd_cb_t write_fn, fr_event_error_cb_t error, void *uctx) |
Associate I/O callbacks with a file descriptor. | |
int | _fr_event_fd_move (NDEBUG_LOCATION_ARGS fr_event_list_t *dst, fr_event_list_t *src, int fd, fr_event_filter_t filter) |
Move a file descriptor event from one event list to another. | |
int | _fr_event_filter_insert (NDEBUG_LOCATION_ARGS TALLOC_CTX *ctx, fr_event_fd_t **ef_out, fr_event_list_t *el, int fd, fr_event_filter_t filter, void *funcs, fr_event_error_cb_t error, void *uctx) |
Insert a filter for the specified fd. | |
int | _fr_event_filter_update (NDEBUG_LOCATION_ARGS fr_event_list_t *el, int fd, fr_event_filter_t filter, fr_event_update_t const updates[]) |
Suspend/resume a subset of filters. | |
int | _fr_event_pid_reap (NDEBUG_LOCATION_ARGS fr_event_list_t *el, pid_t pid, fr_event_pid_cb_t wait_fn, void *uctx))) |
Asynchronously wait for a PID to exit, then reap it. | |
int | _fr_event_pid_wait (NDEBUG_LOCATION_ARGS TALLOC_CTX *ctx, fr_event_list_t *el, fr_event_pid_t const **ev_p, pid_t pid, fr_event_pid_cb_t wait_fn, void *uctx))) |
Insert a PID event into an event list. | |
int | _fr_event_user_insert (NDEBUG_LOCATION_ARGS TALLOC_CTX *ctx, fr_event_list_t *el, fr_event_user_t **ev_p, bool trigger, fr_event_user_cb_t callback, void *uctx) |
Add a user callback to the event list. | |
int | fr_event_corral (fr_event_list_t *el, fr_time_t now, bool wait) |
Gather outstanding timer and file descriptor events. | |
int | fr_event_fd_armour (fr_event_list_t *el, int fd, fr_event_filter_t, uintptr_t armour) |
Armour an FD. | |
fr_event_fd_cb_t | fr_event_fd_cb (fr_event_fd_t *ef, int filter, int fflags) |
Returns the appropriate callback function for a given event. | |
int | fr_event_fd_delete (fr_event_list_t *el, int fd, fr_event_filter_t filter) |
Remove a file descriptor from the event loop. | |
fr_event_fd_t * | fr_event_fd_handle (fr_event_list_t *el, int fd, fr_event_filter_t filter) |
Get the opaque event handle from a file descriptor. | |
void * | fr_event_fd_uctx (fr_event_fd_t *ef) |
Returns the uctx associated with an fr_event_fd_t handle. | |
int | fr_event_fd_unarmour (fr_event_list_t *el, int fd, fr_event_filter_t filter, uintptr_t armour) |
Unarmour an FD. | |
fr_event_list_t * | fr_event_list_alloc (TALLOC_CTX *ctx, fr_event_status_cb_t status, void *status_ctx) |
Initialise a new event list. | |
bool | fr_event_list_empty (fr_event_list_t *el) |
Return whether the event loop has any active events. | |
int | fr_event_list_kq (fr_event_list_t *el) |
Return the kq associated with an event list. | |
uint64_t | fr_event_list_num_fds (fr_event_list_t *el) |
Return the number of file descriptors is_registered with this event loop. | |
uint64_t | fr_event_list_num_timers (fr_event_list_t *el) |
Return the number of timer events currently scheduled. | |
unsigned int | fr_event_list_reap_signal (fr_event_list_t *el, fr_time_delta_t timeout, int signal) |
Send a signal to all the processes we have in our reap list, and reap them. | |
fr_time_t | fr_event_list_time (fr_event_list_t *el) |
Get the current server time according to the event list. | |
int | fr_event_loop (fr_event_list_t *el) |
Run an event loop. | |
void | fr_event_loop_exit (fr_event_list_t *el, int code) |
Signal an event loop exit with the specified code. | |
bool | fr_event_loop_exiting (fr_event_list_t *el) |
Check to see whether the event loop is in the process of exiting. | |
int | fr_event_post_delete (fr_event_list_t *el, fr_event_post_cb_t callback, void *uctx)) |
Delete a post-event callback from the event list. | |
int | fr_event_post_insert (fr_event_list_t *el, fr_event_post_cb_t callback, void *uctx)) |
Add a post-event callback to the event list. | |
int | fr_event_pre_delete (fr_event_list_t *el, fr_event_status_cb_t callback, void *uctx)) |
Delete a pre-event callback from the event list. | |
int | fr_event_pre_insert (fr_event_list_t *el, fr_event_status_cb_t callback, void *uctx)) |
Add a pre-event callback to the event list. | |
void | fr_event_service (fr_event_list_t *el) |
Service any outstanding timer or file descriptor events. | |
int | fr_event_user_delete (fr_event_list_t *el, fr_event_user_cb_t user, void *uctx)) |
int | fr_event_user_trigger (fr_event_list_t *el, fr_event_user_t *ev) |
Trigger a user event. | |
Wrapper around libkqueue to make managing events easier.
Timer lists with event callbacks.
Definition in file event.h.
union fr_event_funcs_t |
Data Fields | ||
---|---|---|
fr_event_io_func_t | io | Read/write functions. |
fr_event_vnode_func_t | vnode | vnode callback functions. |
struct fr_event_io_func_t |
Callbacks for the FR_EVENT_FILTER_IO filter.
Data Fields | ||
---|---|---|
fr_event_fd_cb_t | read | Callback for when data is available. |
fr_event_fd_cb_t | write | Callback for when we can write data. |
struct fr_event_list_pub_s |
Public event list structure.
Make the event timer list available, but nothing else.
This allows us to access these values without the cost of a function call.
Data Fields | ||
---|---|---|
fr_timer_list_t * | tl | The timer list associated with this event loop. |
struct fr_event_update_t |
Data Fields | ||
---|---|---|
size_t | offset | Offset of function in func struct. |
fr_event_op_t | op | Operation to perform on function/filter. |
struct fr_event_vnode_func_t |
Callbacks for the FR_EVENT_FILTER_VNODE filter.
Data Fields | ||
---|---|---|
fr_event_fd_cb_t | attrib | File attributes changed. |
fr_event_fd_cb_t | delete | The file was deleted. |
fr_event_fd_cb_t | extend | Additional files were added to a directory. |
fr_event_fd_cb_t | link | The link count on the file changed. |
fr_event_fd_cb_t | rename | The file was renamed. |
fr_event_fd_cb_t | write | The file was written to. |
#define fr_event_fd_insert | ( | ... | ) | _fr_event_fd_insert(NDEBUG_LOCATION_EXP __VA_ARGS__) |
#define fr_event_fd_mode | ( | ... | ) | _fr_event_fd_move(NDEBUG_LOCATION_EXP __VA_ARGS__) |
#define fr_event_filter_insert | ( | ... | ) | _fr_event_filter_insert(NDEBUG_LOCATION_EXP __VA_ARGS__) |
#define fr_event_filter_update | ( | ... | ) | _fr_event_filter_update(NDEBUG_LOCATION_EXP __VA_ARGS__) |
#define fr_event_pid_reap | ( | ... | ) | _fr_event_pid_reap(NDEBUG_LOCATION_EXP __VA_ARGS__) |
#define fr_event_pid_wait | ( | ... | ) | _fr_event_pid_wait(NDEBUG_LOCATION_EXP __VA_ARGS__) |
#define FR_EVENT_RESUME | ( | _s, | |
_f | |||
) | { .offset = offsetof(_s, _f), .op = FR_EVENT_OP_RESUME } |
Re-add the filter for a func from kevent.
Use to populate elements in an array of fr_event_update_t.
[in] | _s | the structure containing the func to suspend. |
[in] | _f | the func to resume. |
#define FR_EVENT_SUSPEND | ( | _s, | |
_f | |||
) | { .offset = offsetof(_s, _f), .op = FR_EVENT_OP_SUSPEND } |
Temporarily remove the filter for a func from kevent.
Use to populate elements in an array of fr_event_update_t.
[in] | _s | the structure containing the func to suspend. |
[in] | _f | the func to suspend. |
#define fr_event_user_insert | ( | _ctx, | |
_ev_p, | |||
_el, | |||
_trigger, | |||
_callback, | |||
_uctx | |||
) | _fr_event_user_insert(NDEBUG_LOCATION_EXP _ctx, _ev_p, _el, _trigger, _callback, _uctx) |
typedef void(* fr_event_error_cb_t) (fr_event_list_t *el, int fd, int flags, int fd_errno, void *uctx) |
Called when an IO error event occurs on a file descriptor.
[in] | el | Event list the file descriptor was inserted into. |
[in] | fd | That experienced the IO event. |
[in] | flags | field as returned by kevent. |
[in] | fd_errno | File descriptor error. |
[in] | uctx | User ctx passed to fr_event_fd_insert. |
typedef void(* fr_event_fd_cb_t) (fr_event_list_t *el, int fd, int flags, void *uctx) |
Called when an IO event occurs on a file descriptor.
[in] | el | Event list the file descriptor was inserted into. |
[in] | fd | That experienced the IO event. |
[in] | flags | field as returned by kevent. |
[in] | uctx | User ctx passed to fr_event_fd_insert. |
typedef struct fr_event_fd fr_event_fd_t |
typedef struct fr_event_list_pub_s fr_event_list_t |
typedef void(* fr_event_pid_cb_t) (fr_event_list_t *el, pid_t pid, int status, void *uctx) |
Called when a child process has exited.
[in] | el | Event list |
[in] | pid | That exited |
[in] | status | exit status |
[in] | uctx | User ctx passed to fr_event_fd_insert. |
typedef struct fr_event_pid fr_event_pid_t |
typedef void(* fr_event_post_cb_t) (fr_event_list_t *el, fr_time_t now, void *uctx) |
Called when a post event fires.
[in] | el | Event list the post event was inserted into. |
[in] | now | The current time. |
[in] | uctx | User ctx passed to fr_timer_in or fr_timer_at. |
typedef int(* fr_event_status_cb_t) (fr_time_t now, fr_time_delta_t wake, void *uctx) |
Called after each event loop cycle.
Called before calling kqueue to put the thread in a sleeping state.
[in] | now | The current time. |
[in] | wake | When we'll next need to wake up to service an event. |
[in] | uctx | User ctx passed to fr_event_list_alloc. |
typedef void(* fr_event_user_cb_t) (fr_event_list_t *el, void *uctx) |
Called when a user kevent occurs.
[in] | el | Event list |
[in] | uctx | User ctx passed to fr_event_user_insert. |
typedef struct fr_event_user_s fr_event_user_t |
enum fr_event_filter_t |
enum fr_event_op_t |
int _fr_event_fd_insert | ( | NDEBUG_LOCATION_ARGS TALLOC_CTX * | ctx, |
fr_event_fd_t ** | ef_out, | ||
fr_event_list_t * | el, | ||
int | fd, | ||
fr_event_fd_cb_t | read_fn, | ||
fr_event_fd_cb_t | write_fn, | ||
fr_event_error_cb_t | error, | ||
void * | uctx | ||
) |
Associate I/O callbacks with a file descriptor.
[in] | ctx | to bind lifetime of the event to. |
[out] | ef_out | Where to store the output event |
[in] | el | to insert fd callback into. |
[in] | fd | to install filters for. |
[in] | read_fn | function to call when fd is readable. |
[in] | write_fn | function to call when fd is writable. |
[in] | error | function to call when an error occurs on the fd. |
[in] | uctx | to pass to handler. |
Definition at line 1179 of file event.c.
int _fr_event_fd_move | ( | NDEBUG_LOCATION_ARGS fr_event_list_t * | dst, |
fr_event_list_t * | src, | ||
int | fd, | ||
fr_event_filter_t | filter | ||
) |
Move a file descriptor event from one event list to another.
FIXME - Move suspended events too.
[in] | dst | Event list to move file descriptor event to. |
[in] | src | Event list to move file descriptor from. |
[in] | fd | of the event to move. |
[in] | filter | of the event to move. |
Definition at line 895 of file event.c.
int _fr_event_filter_insert | ( | NDEBUG_LOCATION_ARGS TALLOC_CTX * | ctx, |
fr_event_fd_t ** | ef_out, | ||
fr_event_list_t * | el, | ||
int | fd, | ||
fr_event_filter_t | filter, | ||
void * | funcs, | ||
fr_event_error_cb_t | error, | ||
void * | uctx | ||
) |
Insert a filter for the specified fd.
[in] | ctx | to bind lifetime of the event to. |
[out] | ef_out | Previously allocated ef, or NULL. |
[in] | el | to insert fd callback into. |
[in] | fd | to install filters for. |
[in] | filter | one of the fr_event_filter_t values. |
[in] | funcs | Structure containing callback functions. If a function pointer is set, the equivalent kevent filter will be installed. |
[in] | error | function to call when an error occurs on the fd. |
[in] | uctx | to pass to handler. |
Definition at line 1023 of file event.c.
int _fr_event_filter_update | ( | NDEBUG_LOCATION_ARGS fr_event_list_t * | el, |
int | fd, | ||
fr_event_filter_t | filter, | ||
fr_event_update_t const | updates[] | ||
) |
Suspend/resume a subset of filters.
This function trades producing useful errors for speed.
An example of suspending the read filter for an FD would be:
[in] | el | to update descriptor in. |
[in] | fd | to update filters for. |
[in] | filter | The type of filter to update. |
[in] | updates | An array of updates to toggle filters on/off without removing the callback function. |
Definition at line 946 of file event.c.
int _fr_event_pid_reap | ( | NDEBUG_LOCATION_ARGS fr_event_list_t * | el, |
pid_t | pid, | ||
fr_event_pid_cb_t | callback, | ||
void * | uctx | ||
) |
Asynchronously wait for a PID to exit, then reap it.
This is intended to be used when we no longer care about a process exiting, but we still want to clean up its state so we don't have zombie processes sticking around.
[in] | el | to use to reap the process. |
[in] | pid | to reap. |
[in] | callback | to call when the process is reaped. May be NULL. |
[in] | uctx | to pass to callback. |
Definition at line 1666 of file event.c.
int _fr_event_pid_wait | ( | NDEBUG_LOCATION_ARGS TALLOC_CTX * | ctx, |
fr_event_list_t * | el, | ||
fr_event_pid_t const ** | ev_p, | ||
pid_t | pid, | ||
fr_event_pid_cb_t | callback, | ||
void * | uctx | ||
) |
Insert a PID event into an event list.
[in] | ctx | to bind lifetime of the event to. |
[in] | el | to insert event into. |
[in,out] | ev_p | If not NULL modify this event instead of creating a new one. This is a parent in a temporal sense, not in a memory structure or dependency sense. |
[in] | pid | child PID to wait for |
[in] | callback | function to execute if the event fires. |
[in] | uctx | user data to pass to the event. |
Definition at line 1439 of file event.c.
int _fr_event_user_insert | ( | NDEBUG_LOCATION_ARGS TALLOC_CTX * | ctx, |
fr_event_list_t * | el, | ||
fr_event_user_t ** | ev_p, | ||
bool | trigger, | ||
fr_event_user_cb_t | callback, | ||
void * | uctx | ||
) |
Add a user callback to the event list.
[in] | ctx | to allocate the event in. |
[in] | el | Containing the timer events. |
[out] | ev_p | Where to write a pointer. |
[in] | trigger | Whether the user event is triggered initially. |
[in] | callback | for EVFILT_USER. |
[in] | uctx | for the callback. |
Definition at line 1885 of file event.c.
int fr_event_corral | ( | fr_event_list_t * | el, |
fr_time_t | now, | ||
bool | wait | ||
) |
Gather outstanding timer and file descriptor events.
[in] | el | to process events for. |
[in] | now | The current time. |
[in] | wait | if true, block on the kevent() call until a timer or file descriptor event occurs. |
Definition at line 2062 of file event.c.
int fr_event_fd_armour | ( | fr_event_list_t * | el, |
int | fd, | ||
fr_event_filter_t | filter, | ||
uintptr_t | armour | ||
) |
Armour an FD.
[in] | el | to remove file descriptor from. |
[in] | fd | to remove. |
[in] | filter | The type of filter to remove. |
[in] | armour | The armour to add. |
Definition at line 1288 of file event.c.
fr_event_fd_cb_t fr_event_fd_cb | ( | fr_event_fd_t * | ef, |
int | kq_filter, | ||
int | kq_fflags | ||
) |
Returns the appropriate callback function for a given event.
[in] | ef | the event filter fd handle. |
[in] | kq_filter | If the callbacks are indexed by filter. |
[in] | kq_fflags | If the callbacks are indexed by NOTES (fflags). |
Definition at line 1264 of file event.c.
int fr_event_fd_delete | ( | fr_event_list_t * | el, |
int | fd, | ||
fr_event_filter_t | filter | ||
) |
Remove a file descriptor from the event loop.
[in] | el | to remove file descriptor from. |
[in] | fd | to remove. |
[in] | filter | The type of filter to remove. |
Definition at line 1206 of file event.c.
fr_event_fd_t * fr_event_fd_handle | ( | fr_event_list_t * | el, |
int | fd, | ||
fr_event_filter_t | filter | ||
) |
Get the opaque event handle from a file descriptor.
[in] | el | to search for fd/filter in. |
[in] | fd | to search for. |
[in] | filter | to search for. |
Definition at line 1242 of file event.c.
void * fr_event_fd_uctx | ( | fr_event_fd_t * | ef | ) |
int fr_event_fd_unarmour | ( | fr_event_list_t * | el, |
int | fd, | ||
fr_event_filter_t | filter, | ||
uintptr_t | armour | ||
) |
Unarmour an FD.
[in] | el | to remove file descriptor from. |
[in] | fd | to remove. |
[in] | filter | The type of filter to remove. |
[in] | armour | The armour to remove |
Definition at line 1318 of file event.c.
fr_event_list_t * fr_event_list_alloc | ( | TALLOC_CTX * | ctx, |
fr_event_status_cb_t | status, | ||
void * | status_uctx | ||
) |
Initialise a new event list.
[in] | ctx | to allocate memory in. |
[in] | status | callback, called on each iteration of the event list. |
[in] | status_uctx | context for the status callback |
Definition at line 2526 of file event.c.
bool fr_event_list_empty | ( | fr_event_list_t * | el | ) |
int fr_event_list_kq | ( | fr_event_list_t * | el | ) |
uint64_t fr_event_list_num_fds | ( | fr_event_list_t * | el | ) |
uint64_t fr_event_list_num_timers | ( | fr_event_list_t * | el | ) |
unsigned int fr_event_list_reap_signal | ( | fr_event_list_t * | el, |
fr_time_delta_t | timeout, | ||
int | signal | ||
) |
Send a signal to all the processes we have in our reap list, and reap them.
[in] | el | containing the processes to reap. |
[in] | timeout | how long to wait before we signal the processes. |
[in] | signal | to send to processes. Should be a fatal signal. |
Definition at line 1702 of file event.c.
fr_time_t fr_event_list_time | ( | fr_event_list_t * | el | ) |
Get the current server time according to the event list.
If the event list is currently dispatching events, we return the time this iteration of the event list started.
If the event list is not currently dispatching events, we return the current system time.
[in] | el | to get time from. |
Definition at line 593 of file event.c.
int fr_event_loop | ( | fr_event_list_t * | el | ) |
Run an event loop.
[in] | el | to start processing. |
Definition at line 2397 of file event.c.
void fr_event_loop_exit | ( | fr_event_list_t * | el, |
int | code | ||
) |
Signal an event loop exit with the specified code.
The event loop will complete its current iteration, and then exit with the specified code.
[in] | el | to signal to exit. |
[in] | code | for fr_event_loop to return. |
Definition at line 2375 of file event.c.
bool fr_event_loop_exiting | ( | fr_event_list_t * | el | ) |
int fr_event_post_delete | ( | fr_event_list_t * | el, |
fr_event_post_cb_t | callback, | ||
void * | uctx | ||
) |
Delete a post-event callback from the event list.
[in] | el | Containing the timer events. |
[in] | callback | The post-processing callback. |
[in] | uctx | for the callback. |
Definition at line 2033 of file event.c.
int fr_event_post_insert | ( | fr_event_list_t * | el, |
fr_event_post_cb_t | callback, | ||
void * | uctx | ||
) |
Add a post-event callback to the event list.
Events are serviced in insert order. i.e. insert A, B, we then have A running before B.
[in] | el | Containing the timer events. |
[in] | callback | The post-processing callback. |
[in] | uctx | for the callback. |
Definition at line 2011 of file event.c.
int fr_event_pre_delete | ( | fr_event_list_t * | el, |
fr_event_status_cb_t | callback, | ||
void * | uctx | ||
) |
Delete a pre-event callback from the event list.
[in] | el | Containing the timer events. |
[in] | callback | The pre-processing callback. |
[in] | uctx | for the callback. |
Definition at line 1979 of file event.c.
int fr_event_pre_insert | ( | fr_event_list_t * | el, |
fr_event_status_cb_t | callback, | ||
void * | uctx | ||
) |
Add a pre-event callback to the event list.
Events are serviced in insert order. i.e. insert A, B, we then have A running before B.
[in] | el | Containing the timer events. |
[in] | callback | The pre-processing callback. |
[in] | uctx | for the callback. |
Definition at line 1957 of file event.c.
void fr_event_service | ( | fr_event_list_t * | el | ) |
int fr_event_user_delete | ( | fr_event_list_t * | el, |
fr_event_user_cb_t | user, | ||
void * | uctx | ||
) |
int fr_event_user_trigger | ( | fr_event_list_t * | el, |
fr_event_user_t * | ev | ||
) |