23#ifndef __KOS_GENWAIT_H
24#define __KOS_GENWAIT_H
51 void (*callback)(
void *));
152int genwait_init(
void);
155void genwait_shutdown(
void);
Various common macros used throughout the codebase.
int genwait_wait(void *obj, const char *mesg, unsigned int timeout, void(*callback)(void *))
Sleep on an object.
void genwait_wake_all_err(const void *obj, int err)
Wake up all threads sleeping on an object, with an error.
int genwait_wake_cnt(const void *obj, int cnt, int err)
Wake up a number of threads sleeping on an object.
int genwait_wake_thd(const void *obj, kthread_t *thd, int err) __nonnull((2))
Wake up a specific thread that is sleeping on an object.
void genwait_wake_one_err(const void *obj, int err)
Wake up one thread sleeping on an object, with an error.
void genwait_wake_one(const void *obj)
Wake up one thread sleeping on an object.
void genwait_check_timeouts(uint64_t now)
Look for timed out genwait_wait() calls.
uint64_t genwait_next_timeout(void)
Look for the next timeout event time.
void genwait_wake_all(const void *obj)
Wake up all threads sleeping on an object.
Structure describing one running thread.
Definition thread.h:164