APCs
include/thread/apc.h View source View on GitHubStructs
Section titled “Structs”struct apc {
apc_func_t func;
void *ctx;
struct thread *owner;
struct apc *next;
}; event_apc
Section titled “event_apc”struct event_apc {
struct apc apc;
struct apc_event_desc *desc;
size_t execute_times;
}; apc_event_desc
Section titled “apc_event_desc”struct apc_event_desc {
const char *name;
}; Functions
Section titled “Functions”apc_create
Section titled “apc_create”struct apc * apc_create(void); apc_event_apc_create
Section titled “apc_event_apc_create”struct event_apc * apc_event_apc_create(void); apc_init
Section titled “apc_init”void apc_init(struct apc *a, apc_func_t fn, void *arg1); apc_event_apc_init
Section titled “apc_event_apc_init”void apc_event_apc_init(struct event_apc *a, apc_func_t fn, void *arg1); apc_event_signal
Section titled “apc_event_signal”void apc_event_signal(struct apc_event_desc *desc); apc_enqueue
Section titled “apc_enqueue”void apc_enqueue(struct thread *t, struct apc *a, enum apc_type type); apc_enqueue_event_apc
Section titled “apc_enqueue_event_apc”void apc_enqueue_event_apc(struct event_apc *a, struct apc_event_desc *d); apc_cancel
Section titled “apc_cancel”bool apc_cancel(struct apc *a); apc_check_and_deliver
Section titled “apc_check_and_deliver”void apc_check_and_deliver(struct thread *t); apc_enable_special
Section titled “apc_enable_special”void apc_enable_special(); apc_disable_special
Section titled “apc_disable_special”void apc_disable_special(); apc_enable_kernel
Section titled “apc_enable_kernel”void apc_enable_kernel(); apc_disable_kernel
Section titled “apc_disable_kernel”void apc_disable_kernel(); apc_free_on_thread
Section titled “apc_free_on_thread”void apc_free_on_thread(struct thread *t); apc_event_str
Section titled “apc_event_str”char apc_event_str(struct apc_event_desc *evt); apc_enqueue_on_curr
Section titled “apc_enqueue_on_curr”void apc_enqueue_on_curr(struct apc *a, enum apc_type type); apc_queue_init
Section titled “apc_queue_init”void apc_queue_init(struct apc_queue *q); Macros
Section titled “Macros”APC_EVENT_EXTERN
Section titled “APC_EVENT_EXTERN”#define APC_EVENT_EXTERN(n) extern struct apc_event_desc __apc_event_##n APC_EVENT_CREATE
Section titled “APC_EVENT_CREATE”#define APC_EVENT_CREATE(n, strname) \
struct apc_event_desc __apc_event_##n = {.name = strname} APC_EVENT
Section titled “APC_EVENT”#define APC_EVENT(n) &(__apc_event_##n)