1#ifndef __VSF_LINUX_WAIT_H__
2#define __VSF_LINUX_WAIT_H__
15#define WQ_FLAG_EXCLUSIVE 0x01
16#define WQ_FLAG_WOKEN 0x02
17#define WQ_FLAG_BOOKMARK 0x04
18#define WQ_FLAG_CUSTOM 0x08
19#define WQ_FLAG_DONE 0x10
20#define WQ_FLAG_PRIORITY 0x20
38 INIT_LIST_HEAD(&wqh->
head);
50#define __wait_event_timeout(__wqh, __cond, __timeout) ({ \
51 struct wait_queue_entry __wqe; \
52 long local_timeout = (__timeout); \
54 vsf_eda_trig_init(&trig, false, true); \
55 __wqe.__trig = &trig; \
56 init_wait_entry(&__wqe, 0); \
58 prepare_to_wait_event(&__wqh, &__wqe, 0); \
62 vsf_thread_trig_pend(&trig, local_timeout); \
64 finish_wait(&__wqh, &__wqe); \
68#define wait_event_timeout(__wqh, __cond, __timeout) ({ \
69 long local_timeout = (__timeout); \
70 bool local_cond = (__cond); \
71 if (local_cond && !local_timeout) { \
74 if (!(local_cond || !local_timeout)) { \
75 local_timeout = __wait_event_timeout(__wqh, __cond, __timeout); \
80#define wait_event(__wqh, __cond) wait_event_timeout(__wqh, __cond, -1)
82#define wake_up(__wqh) wake_up_nr((__wqh), 1)
83#define wake_up_all(__wqh) wake_up_nr((__wqh), -1)
__le16 timeout
Definition ieee80211.h:94
#define spin_lock_init(lock)
Definition spinlock.h:29
int spinlock_t
Definition spinlock.h:26
int autoremove_wake_function(struct wait_queue_entry *wqe, unsigned mode, int sync, void *key)
Definition vsf_linux_core.c:445
void prepare_to_wait(struct wait_queue_head *wqh, struct wait_queue_entry *wqe, int state)
int(* wait_queue_func_t)(struct wait_queue_entry *wqe, unsigned mode, int flags, void *key)
Definition wait.h:13
void finish_wait(struct wait_queue_head *wqh, struct wait_queue_entry *wqe)
Definition vsf_linux_core.c:470
int woken_wake_function(struct wait_queue_entry *wqe, unsigned mode, int sync, void *key)
long prepare_to_wait_event(struct wait_queue_head *wqh, struct wait_queue_entry *wqe, int state)
Definition vsf_linux_core.c:451
void wake_up_nr(struct wait_queue_head *wqh, int nr)
Definition vsf_linux_core.c:480
void init_wait_entry(struct wait_queue_entry *wqe, int flags)
Definition vsf_linux_core.c:462
struct wait_queue_head wait_queue_head_t
long wait_woken(struct wait_queue_entry *wqe, unsigned mode, long timeout)
struct wait_queue_entry wait_queue_entry_t
bool prepare_to_wait_exclusive(struct wait_queue_head *wqh, struct wait_queue_entry *wqe, int state)
wait_queue_func_t func
Definition wait.h:24
unsigned int flags
Definition wait.h:23
vsf_trig_t * __trig
Definition wait.h:27
struct list_head entry
Definition wait.h:25
spinlock_t lock
Definition wait.h:31
struct list_head head
Definition wait.h:32
void sync(void)
Definition vsf_linux_fs.c:2137
uint8_t state
Definition vsf_msg_tree.h:247