condvar
include/sync/condvar.h View source View on GitHubStructs
Section titled “Structs”condvar
Section titled “condvar”struct condvar {
struct thread_queue waiters;
bool irq_disable;
}; condvar_with_cb
Section titled “condvar_with_cb”struct condvar_with_cb {
struct condvar *cv;
condvar_callback cb;
void *cb_arg;
size_t cookie;
}; Type Aliases
Section titled “Type Aliases”condvar_callback
Section titled “condvar_callback”typedef void (*condvar_callback)(void * *); thread_action_callback
Section titled “thread_action_callback”typedef void (*thread_action_callback)(struct thread * woke); Functions
Section titled “Functions”condvar_wait
Section titled “condvar_wait”enum wake_reason condvar_wait(struct condvar *cv, struct spinlock *lock, enum irql irql, enum irql *out); condvar_init
Section titled “condvar_init”void condvar_init(struct condvar *cv, bool irq_disable); condvar_signal
Section titled “condvar_signal”struct thread * condvar_signal(struct condvar *cv); condvar_signal_callback
Section titled “condvar_signal_callback”struct thread * condvar_signal_callback(struct condvar *cv, thread_action_callback cb); condvar_broadcast_callback
Section titled “condvar_broadcast_callback”void condvar_broadcast_callback(struct condvar *cv, thread_action_callback cb); condvar_broadcast
Section titled “condvar_broadcast”void condvar_broadcast(struct condvar *cv); condvar_wait_timeout
Section titled “condvar_wait_timeout”enum wake_reason condvar_wait_timeout(struct condvar *cv, struct spinlock *lock, time_t timeout_ms, enum irql irql, enum irql *out); Macros
Section titled “Macros”CONDVAR_INIT_IRQ_DISABLE
Section titled “CONDVAR_INIT_IRQ_DISABLE”#define CONDVAR_INIT_IRQ_DISABLE true CONDVAR_INIT_NORMAL
Section titled “CONDVAR_INIT_NORMAL”#define CONDVAR_INIT_NORMAL false