Subversion Repositories HelenOS

Rev

Rev 2109 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2109 Rev 2310
Line 38... Line 38...
38
#include <arch/types.h>
38
#include <arch/types.h>
39
#include <synch/spinlock.h>
39
#include <synch/spinlock.h>
40
#include <synch/synch.h>
40
#include <synch/synch.h>
41
#include <adt/list.h>
41
#include <adt/list.h>
42
 
42
 
-
 
43
typedef enum {
43
#define WAKEUP_FIRST    0
44
    WAKEUP_FIRST = 0,
44
#define WAKEUP_ALL  1
45
    WAKEUP_ALL
-
 
46
} wakeup_mode_t;
45
 
47
 
46
/** Wait queue structure. */
48
/** Wait queue structure. */
47
typedef struct {
49
typedef struct {
48
 
50
 
49
    /** Lock protecting wait queue structure.
51
    /** Lock protecting wait queue structure.
Line 68... Line 70...
68
extern void waitq_initialize(waitq_t *wq);
70
extern void waitq_initialize(waitq_t *wq);
69
extern int waitq_sleep_timeout(waitq_t *wq, uint32_t usec, int flags);
71
extern int waitq_sleep_timeout(waitq_t *wq, uint32_t usec, int flags);
70
extern ipl_t waitq_sleep_prepare(waitq_t *wq);
72
extern ipl_t waitq_sleep_prepare(waitq_t *wq);
71
extern int waitq_sleep_timeout_unsafe(waitq_t *wq, uint32_t usec, int flags);
73
extern int waitq_sleep_timeout_unsafe(waitq_t *wq, uint32_t usec, int flags);
72
extern void waitq_sleep_finish(waitq_t *wq, int rc, ipl_t ipl);
74
extern void waitq_sleep_finish(waitq_t *wq, int rc, ipl_t ipl);
73
extern void waitq_wakeup(waitq_t *wq, bool all);
75
extern void waitq_wakeup(waitq_t *wq, wakeup_mode_t mode);
74
extern void _waitq_wakeup_unsafe(waitq_t *wq, bool all);
76
extern void _waitq_wakeup_unsafe(waitq_t *wq, wakeup_mode_t mode);
75
extern void waitq_interrupt_sleep(struct thread *t);
77
extern void waitq_interrupt_sleep(struct thread *t);
76
 
78
 
77
#endif
79
#endif
78
 
80
 
79
/** @}
81
/** @}