wor_queue相关函数
来源:互联网 发布:python工具 量化交易 编辑:程序博客网 时间:2024/05/18 01:26
1: INIT_WORK(struct work_struct *work, work_func_t func);
//初始化指定工作,目的是把用户指定的函数_func及_func。
2: INIT_DELAYED_WORK(struct delayed_work *work, work_func_t func);
3: int schedule_work(struct work_struct *work);
//对工作进行调度,即把给定工作的处理函数提交给缺省的工作队列和工作者线程。工作者线程本质上是一个普通的内核线程,在默认情况下,每个CPU均有一个类型为“events”的工作者线程,当调用schedule_work时,这个工作者线程会被唤醒去执行工作链表上的所有工作。
4: int schedule_delayed_work(struct delayed_work *work, unsigned long delay);
//延迟执行工作,与schedule_work类似。
5: struct workqueue_struct *create_workqueue(const char *name);
//自定义工作队列,创建新的工作队列和相应的工作者线程,name用于该内核线程的命名。
6: int queue_work(struct workqueue_struct *wq, struct work_struct *work);
//类似于schedule_work,区别在于queue_work把给定工作提交给创建的工作队列wq而不是缺省队列。
7: int queue_delayed_work(struct workqueue_struct *wq, struct delayed_work *work, unsigned long delay);
//延迟执行工作。
8: void flush_scheduled_work(void);
//刷新缺省工作队列。此函数会一直等待,直到队列中的所有工作都被执行。
9: void flush_workqueue(struct workqueue_struct *wq);
//刷新指定工作队列。
10: int cancel_delayed_work(struct delayed_work *work);
//flush_scheduled_work并不取消任何延迟执行的工作,因此,如果要取消延迟工作,应该调用cancel_delayed_work。
11: void destroy_workqueue(struct workqueue_struct *wq);
//释放创建的工作队列。
//初始化指定工作,目的是把用户指定的函数_func及_func。
2: INIT_DELAYED_WORK(struct delayed_work *work, work_func_t func);
3: int schedule_work(struct work_struct *work);
//对工作进行调度,即把给定工作的处理函数提交给缺省的工作队列和工作者线程。工作者线程本质上是一个普通的内核线程,在默认情况下,每个CPU均有一个类型为“events”的工作者线程,当调用schedule_work时,这个工作者线程会被唤醒去执行工作链表上的所有工作。
4: int schedule_delayed_work(struct delayed_work *work, unsigned long delay);
//延迟执行工作,与schedule_work类似。
5: struct workqueue_struct *create_workqueue(const char *name);
//自定义工作队列,创建新的工作队列和相应的工作者线程,name用于该内核线程的命名。
6: int queue_work(struct workqueue_struct *wq, struct work_struct *work);
//类似于schedule_work,区别在于queue_work把给定工作提交给创建的工作队列wq而不是缺省队列。
7: int queue_delayed_work(struct workqueue_struct *wq, struct delayed_work *work, unsigned long delay);
//延迟执行工作。
8: void flush_scheduled_work(void);
//刷新缺省工作队列。此函数会一直等待,直到队列中的所有工作都被执行。
9: void flush_workqueue(struct workqueue_struct *wq);
//刷新指定工作队列。
10: int cancel_delayed_work(struct delayed_work *work);
//flush_scheduled_work并不取消任何延迟执行的工作,因此,如果要取消延迟工作,应该调用cancel_delayed_work。
11: void destroy_workqueue(struct workqueue_struct *wq);
//释放创建的工作队列。
0 0
- wor_queue相关函数
- 函数相关
- 函数相关
- 相关函数
- 日期相关的函数
- 文本操作相关函数
- Variant的相关函数
- ShellExecute函数相关用法
- 工作路径相关函数
- SetWindowOrg等相关函数
- SQL 日期函数相关
- CriticalSection相关函数(转)
- socket相关函数
- Inode相关函数
- Xlib 相关函数简介
- C/C++ 相关函数
- 内存访问相关函数
- access相关函数
- MProtect使用小计【三】 – 权限管理
- iOS 错误 property's synthesized getter follows Cocoa naming convention for returning 'owned' objects
- hdu 5090 Game with Pearls(最大匹配)
- C语言分割字符串
- An Introduction to Interactive Programming in Python(week 6)
- wor_queue相关函数
- Handler源码认知
- syntax error near unexpected token `then'问题的解决
- 可做刮刮卡的图像擦除插件jQuery eraser
- 多线程同步一例
- 19.abstract class和interface有什么区别?
- Python模块的定义
- Android 4.3 安全提升,Set-UID-Root 权限提升不再起作用,原先的ROOT方法将失效
- hexdump的用法