DPCs
include/thread/dpc.h View source View on GitHubStructs
Section titled “Structs”struct dpc {
dpc_func_t func;
void *ctx;
_Atomic (struct dpc *) next;
_Atomic (bool) enqueued;
}; dpc_queue
Section titled “dpc_queue”struct dpc_queue {
_Atomic (struct dpc *) head;
_Atomic size_t count;
}; dpc_cpu
Section titled “dpc_cpu”struct dpc_cpu {
_Atomic (bool) ipi_queued;
struct dpc_queue queues[DPC_EVENT_MAX];
}; dpc_event
Section titled “dpc_event”enum dpc_event {
DPC_NONE,
DPC_CPU_IDLE,
DPC_CPU_WOKE,
DPC_EVENT_MAX,
}; Type Aliases
Section titled “Type Aliases”dpc_func_t
Section titled “dpc_func_t”typedef void (*dpc_func_t)(struct dpc * *, void * ctx); Functions
Section titled “Functions”dpc_run_local
Section titled “dpc_run_local”void dpc_run_local(void); dpc_create
Section titled “dpc_create”struct dpc * dpc_create(dpc_func_t fn, void *ctx); dpc_init
Section titled “dpc_init”struct dpc * dpc_init(struct dpc *d, dpc_func_t fn, void *ctx); dpc_init_percpu
Section titled “dpc_init_percpu”void dpc_init_percpu(void); dpc_enqueue_local
Section titled “dpc_enqueue_local”bool dpc_enqueue_local(struct dpc *d, enum dpc_event e); dpc_enqueue_on_cpu
Section titled “dpc_enqueue_on_cpu”bool dpc_enqueue_on_cpu(size_t cpu, struct dpc *d, enum dpc_event e);