Changeset View
Changeset View
Standalone View
Standalone View
sys/sys/_callout.h
Show First 20 Lines • Show All 44 Lines • ▼ Show 20 Lines | |||||
struct lock_object; | struct lock_object; | ||||
LIST_HEAD(callout_list, callout); | LIST_HEAD(callout_list, callout); | ||||
SLIST_HEAD(callout_slist, callout); | SLIST_HEAD(callout_slist, callout); | ||||
TAILQ_HEAD(callout_tailq, callout); | TAILQ_HEAD(callout_tailq, callout); | ||||
typedef void callout_func_t(void *); | typedef void callout_func_t(void *); | ||||
#ifdef CALLOUT_DEBUG_DRAIN | |||||
struct callout_next_data { | |||||
callout_func_t *c_func; | |||||
void *c_arg; | |||||
void *c_arg1; | |||||
}; | |||||
#endif | |||||
struct callout { | struct callout { | ||||
union { | union { | ||||
LIST_ENTRY(callout) le; | LIST_ENTRY(callout) le; | ||||
SLIST_ENTRY(callout) sle; | SLIST_ENTRY(callout) sle; | ||||
TAILQ_ENTRY(callout) tqe; | TAILQ_ENTRY(callout) tqe; | ||||
} c_links; | } c_links; | ||||
sbintime_t c_time; /* ticks to the event */ | sbintime_t c_time; /* ticks to the event */ | ||||
sbintime_t c_precision; /* delta allowed wrt opt */ | sbintime_t c_precision; /* delta allowed wrt opt */ | ||||
void *c_arg; /* function argument */ | void *c_arg; /* function argument */ | ||||
callout_func_t *c_func; /* function to call */ | callout_func_t *c_func; /* function to call */ | ||||
struct lock_object *c_lock; /* lock to handle */ | struct lock_object *c_lock; /* lock to handle */ | ||||
short c_flags; /* User State */ | short c_flags; /* User State */ | ||||
short c_iflags; /* Internal State */ | short c_iflags; /* Internal State */ | ||||
volatile int c_cpu; /* CPU we're scheduled on */ | volatile int c_cpu; /* CPU we're scheduled on */ | ||||
#ifdef CALLOUT_DEBUG_DRAIN | |||||
void *c_arg1; | |||||
struct callout_next_data c_nd; | |||||
#endif | |||||
}; | }; | ||||
#endif | #endif |