22 #ifndef __KOS_GENWAIT_H
23 #define __KOS_GENWAIT_H
25 #include <sys/cdefs.h>
48 int genwait_wait(
void * obj,
const char * mesg,
int timeout,
void (*callback)(
void *));
152 void genwait_shutdown();
uint64 genwait_next_timeout()
Look for the next timeout event time.
void genwait_check_timeouts(uint64 now)
Look for timed out genwait_wait() calls.
int genwait_wake_cnt(void *obj, int cnt, int err)
Wake up a number of threads sleeping on an object.
void genwait_wake_all(void *obj)
Wake up all threads sleeping on an object.
void genwait_wake_one(void *obj)
Wake up one thread sleeping on an object.
void genwait_wake_one_err(void *obj, int err)
Wake up one thread sleeping on an object, with an error.
unsigned long long uint64
64-bit unsigned integer
Definition: types.h:27
void genwait_wake_all_err(void *obj, int err)
Wake up all threads sleeping on an object, with an error.
int genwait_wake_thd(void *obj, kthread_t *thd, int err)
Wake up a specific thread that is sleeping on an object.
Structure describing one running thread.
Definition: thread.h:90
int genwait_wait(void *obj, const char *mesg, int timeout, void(*callback)(void *))
Sleep on an object.