Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 2307 → Rev 2308

/branches/rcu/kernel/generic/include/synch/waitq.h
40,9 → 40,18
#include <synch/synch.h>
#include <adt/list.h>
 
#define WAKEUP_FIRST 0
#define WAKEUP_ALL 1
 
/** Specifies behavior of the waitq_wakeup */
typedef enum {
WAKEUP_FIRST = 0, /**< Wakes up only the first sleeping thread, if there
aren't any sleeping threads increments missed wakeups */
WAKEUP_ALL = 1, /**< Wakes up all sleeping threads AND zeroes out
missed_wakeups */
WAKEUP_ALL_INC_MISSED, /**< Wakes up all sleeping threads OR increments
missed_wakeups if there aren't any */
} wakeup_all_flag_t;
 
 
/** Wait queue structure. */
typedef struct {
 
70,8 → 79,8
extern ipl_t waitq_sleep_prepare(waitq_t *wq);
extern int waitq_sleep_timeout_unsafe(waitq_t *wq, uint32_t usec, int flags);
extern void waitq_sleep_finish(waitq_t *wq, int rc, ipl_t ipl);
extern void waitq_wakeup(waitq_t *wq, bool all);
extern void _waitq_wakeup_unsafe(waitq_t *wq, bool all);
extern void waitq_wakeup(waitq_t *wq, int all);
extern void _waitq_wakeup_unsafe(waitq_t *wq, int all);
extern void waitq_interrupt_sleep(struct thread *t);
 
#endif