进程调度API之init_waitqueue_entry
来源:互联网 发布:影集制作软件免费版 编辑:程序博客网 时间:2024/06/01 07:11
static inline void init_waitqueue_entry(wait_queue_t *q, struct task_struct *p)是等待队列的基础适用函数之一,之前的博文已经给出过等待队列的用法了这个函数的作用是用新进程来初始化队列static inline void init_waitqueue_entry(wait_queue_t *q, struct task_struct *p){q->flags= 0;q->private= p;q->func= default_wake_function;}可见这里等待队列到期执行的函数default_wake_function主要用来wakeup当前thread。static inline voidinit_waitqueue_func_entry(wait_queue_t *q, wait_queue_func_t func){q->flags= 0;q->private= NULL;q->func= func;}通过init_waitqueue_func_entry 可以指定等待队列到期执行的函数为用户指定的函数。即等待队列到期不一定非得执行wakeup函数.可以检测一个条件,如果这个条件成立的话再调用default_wake_function来唤醒进程。
阅读全文
0 0
- 进程调度API之init_waitqueue_entry
- 进程调度API之__wake_up
- 进程调度API之__wake_up_sync
- 进程调度API之preempt_count_dec_and_test
- 进程调度API之should_resched
- 进程调度API之preempt_schedule
- 进程调度API之add_wait_queue_exclusive
- 进程调度API之autoremove_wake_function
- 进程调度API之complete
- 进程调度API之complete_all
- 进程调度API之completion_done
- 进程调度API之wait_for_completion_x
- 进程调度API之finish_wait
- 进程调度API之init_waitqueue_head
- 进程调度API之prepare_to_wait
- 进程调度API之set_cpus_allowed_ptr
- 进程调度API之set_user_nice
- 进程调度API之sleep_on_spinunlock
- 数据驱动型企业如何炼成?只需五步!
- iOS_Copy到底什么时候用?
- 【21-Redis:LRU算法使用】
- (转)cmake构建时指定编译器架构(x86 or x64)
- 行人重识别RE-ID 琐碎知识点总结
- 进程调度API之init_waitqueue_entry
- 亚马逊:内容付费重构了阅读新场景,阅读也早已跳出纸质书的概念
- Spring 框架简介
- poj2396 Budget(有源汇的有上下界的可行流)
- okhttp的二次封装
- 商品详情界面点击跳转到购物车(二)购物车界面
- SVN检出未响应问题
- 唯品会2017年双11大促技术保障实践,全域提供25万QPS服务能力
- Spring干货汇总(含Spring Boot与Spring Cloud)