4 #ifndef __KERNEL_WAIT_H__
5 #define __KERNEL_WAIT_H__
21 #define DECLARE_WAIT_QUEUE_HEAD(name) LIST_HEAD(name)
28 #define init_waitqueue_head(wq) INIT_LIST_HEAD(wq)
36 #define wait_event(wq_head, condition) \
38 CURRENT_THREAD_INFO(curr_thread); \
42 prepare_to_wait(&wq_head, curr_thread, THREAD_WAIT); \
void prepare_to_wait(struct list_head *wait_list, struct thread_info *thread, int state)
Suspend current thread and place it into a wait list with a new state.
Definition: kernel.c:603
void wake_up_all(struct list_head *wait_list)
Wake up all threads from the wait list.
Definition: kernel.c:653
void finish_wait(struct thread_info *thread)
Move the thread from a wait list into a ready list and set it to be ready.
Definition: kernel.c:615
void wake_up(struct list_head *wait_list)
Wake up the highest priority thread from the wait list.
Definition: kernel.c:627