linux驱动同步与互斥
-
2023-08-17 05:08:29
- 来源:互联网
-
在手机上看
扫一扫立即进入手机端
事件等待队列一般用于linux驱动的异步通信,也可以叫做申请设备使用权等待队列。当多个进程去操作一个设备时,这个时候一般要用到事件队列。
1、不可中断睡眠:
wait_event(queue, condition)
wait_event_interruptible(queue, condition)
两个函数只有在condition变为true才能唤醒,否则一直睡眠,即是调用wake_up()也不能唤醒。
2、可中断睡眠
wait_event_timeout(queue, condition, timeout)
wait_event_interruptible_timeout(queue, condition, timeout)
两个函数在condition变为true或wake_up_interruptible()被调用都能被唤醒。
3,唤醒函数:
void wake_up(wait_queue_head_t *queue); //唤醒所有
void wake_up_interruptible(wait_queue_head_t *queue); //唤醒interruptible
相关资讯
更多-
运满满司机找货app手机版
中文|151.8M
-
美图秀秀64位版本
中文|179.4M
-
小米usb驱动程序
中文|
-
2345看图王电脑版
中文|25.2M
-
速8酒店
中文|49.6M
-
全免漫画软件
中文|37.5M
-
中文|
-
GoodSync2Go中文注册版(文件同步软件工具)
中文|32.5M
-
同步课堂课中客户端
中文|148.1M
-
GoodSync(文件同步软件)
中文|44.5M
-
微力同步最新版
中文|13.5M
-
学宝小学语数英同步学app
中文|125.3M