Changeset View
Changeset View
Standalone View
Standalone View
sys/sys/_eventhandler.h
Show All 26 Lines | |||||
* | * | ||||
* $FreeBSD$ | * $FreeBSD$ | ||||
*/ | */ | ||||
#ifndef _SYS__EVENTHANDLER_H_ | #ifndef _SYS__EVENTHANDLER_H_ | ||||
#define _SYS__EVENTHANDLER_H_ | #define _SYS__EVENTHANDLER_H_ | ||||
#include <sys/queue.h> | #include <sys/queue.h> | ||||
#include <sys/ck.h> | |||||
#include <sys/epoch.h> | |||||
struct eventhandler_entry { | struct eventhandler_entry { | ||||
TAILQ_ENTRY(eventhandler_entry) ee_link; | CK_LIST_ENTRY(eventhandler_entry) ee_link; | ||||
int ee_priority; | int ee_priority; | ||||
#define EHE_DEAD_PRIORITY (-1) | #define EHE_DEAD_PRIORITY (-1) | ||||
void *ee_arg; | void *ee_arg; | ||||
struct epoch_context ee_epoch_ctx; | |||||
}; | }; | ||||
typedef struct eventhandler_entry *eventhandler_tag; | typedef struct eventhandler_entry *eventhandler_tag; | ||||
/* | /* | ||||
* You can optionally use the EVENTHANDLER_LIST and EVENTHANDLER_DIRECT macros | * You can optionally use the EVENTHANDLER_LIST and EVENTHANDLER_DIRECT macros | ||||
* to pre-define a symbol for the eventhandler list. This symbol can be used by | * to pre-define a symbol for the eventhandler list. This symbol can be used by | ||||
* EVENTHANDLER_DIRECT_INVOKE, which has the advantage of not needing to do a | * EVENTHANDLER_DIRECT_INVOKE, which has the advantage of not needing to do a | ||||
Show All 24 Lines |