定义“等待队列头”
wait_queue_head_t
my_queue;
初始化“等待队列头”
init_waitqueue_head(&my_queue);
定义等待队列
DECLARE_WAITQUEUE_HEAD(name)
添加/移除等待队列
void
fastcall add_wait_queue(wait_queue_head_t *q, wait_queue_t *wait);
void
fastcall remove_wait_queue(wait_queue_head_t *q, wait_queue_t *wait);
等待事件
wait_event(queue,
condition)
wait_event_interruptible(queue,
condition)
wait_event_timeout(queue,
condition, timeout)
wait_even_interruptible_timeout(queue,
condition, timeout)
唤醒队列
void
wake_up(wait_queue_head_t *queue);
void
wake_up_interruptible(wait_queue_head_t *queue);
在等待队列上睡眠
sleep_on(wait_queue_head_t
*q);
interruptible_sleep_on(wait_queue_head_t
*q);
文章评论(0条评论)
登录后参与讨论