FreeBSD kernel kern code
subr_eventhandler.c File Reference
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/kernel.h>
#include <sys/lock.h>
#include <sys/malloc.h>
#include <sys/mutex.h>
#include <sys/proc.h>
#include <sys/systm.h>
#include <sys/eventhandler.h>
Include dependency graph for subr_eventhandler.c:

Go to the source code of this file.

Functions

 __FBSDID ("$BSDSUniX$")
 
static MALLOC_DEFINE (M_EVENTHANDLER,"eventhandler","Event handler records")
 
static TAILQ_HEAD (eventhandler_list)
 
static struct eventhandler_list * _eventhandler_find_list (const char *name)
 
static void eventhandler_init (void *dummy __unused)
 
 SYSINIT (eventhandlers, SI_SUB_EVENTHANDLER, SI_ORDER_FIRST, eventhandler_init, NULL)
 
static eventhandler_tag eventhandler_register_internal (struct eventhandler_list *list, const char *name, eventhandler_tag epn)
 
eventhandler_tag eventhandler_register (struct eventhandler_list *list, const char *name, void *func, void *arg, int priority)
 
void eventhandler_deregister (struct eventhandler_list *list, eventhandler_tag tag)
 
struct eventhandler_list * eventhandler_find_list (const char *name)
 
void eventhandler_prune_list (struct eventhandler_list *list)
 

Function Documentation

__FBSDID ( "$BSDSUniX$"  )
static struct eventhandler_list * _eventhandler_find_list ( const char *  name)
static

Definition at line 227 of file subr_eventhandler.c.

Referenced by eventhandler_find_list(), and eventhandler_register_internal().

Here is the caller graph for this function:

void eventhandler_deregister ( struct eventhandler_list *  list,
eventhandler_tag  tag 
)

Definition at line 184 of file subr_eventhandler.c.

References free().

Here is the call graph for this function:

struct eventhandler_list* eventhandler_find_list ( const char *  name)

Definition at line 243 of file subr_eventhandler.c.

References _eventhandler_find_list().

Here is the call graph for this function:

static void eventhandler_init ( void *dummy  __unused)
static

Definition at line 58 of file subr_eventhandler.c.

References mtx_init().

Here is the call graph for this function:

void eventhandler_prune_list ( struct eventhandler_list *  list)

Definition at line 264 of file subr_eventhandler.c.

References free(), and wakeup().

Here is the call graph for this function:

eventhandler_tag eventhandler_register ( struct eventhandler_list *  list,
const char *  name,
void *  func,
void *  arg,
int  priority 
)

Definition at line 141 of file subr_eventhandler.c.

References eventhandler_register_internal(), malloc(), and priority.

Here is the call graph for this function:

static eventhandler_tag eventhandler_register_internal ( struct eventhandler_list *  list,
const char *  name,
eventhandler_tag  epn 
)
static

Definition at line 72 of file subr_eventhandler.c.

References _eventhandler_find_list(), free(), malloc(), and mtx_init().

Referenced by eventhandler_register().

Here is the call graph for this function:

Here is the caller graph for this function:

static MALLOC_DEFINE ( M_EVENTHANDLER  ,
"eventhandler"  ,
"Event handler records"   
)
static
SYSINIT ( eventhandlers  ,
SI_SUB_EVENTHANDLER  ,
SI_ORDER_FIRST  ,
eventhandler_init  ,
NULL   
)
static TAILQ_HEAD ( eventhandler_list  )
static

Definition at line 42 of file subr_eventhandler.c.