23#ifndef __KOS_GENWAIT_H
24#define __KOS_GENWAIT_H
49int genwait_wait(
void * obj,
const char * mesg,
int timeout,
void (*callback)(
void *));
150int genwait_init(
void);
153void genwait_shutdown(
void);
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.
void genwait_wake_all(void *obj)
Wake up all threads sleeping on an object.
int genwait_wait(void *obj, const char *mesg, int timeout, void(*callback)(void *))
Sleep on an object.
void genwait_check_timeouts(uint64 now)
Look for timed out genwait_wait() calls.
int genwait_wake_thd(void *obj, kthread_t *thd, int err)
Wake up a specific thread that is sleeping on an object.
void genwait_wake_all_err(void *obj, int err)
Wake up all threads sleeping on an object, with an error.
int genwait_wake_cnt(void *obj, int cnt, int err)
Wake up a number of threads sleeping on an object.
uint64 genwait_next_timeout(void)
Look for the next timeout event time.
unsigned long long uint64
64-bit unsigned integer
Definition types.h:32
Structure describing one running thread.
Definition thread.h:169