kthread
来源:互联网 发布:淘宝网充话费怎么查询 编辑:程序博客网 时间:2024/05/31 13:16
kernel/init/main.cstatic noinline void __init_refok rest_init(void){ ... pid = kernel_thread(kthreadd, NULL, CLONE_FS | CLONE_FILES); .. kthreadd_task = find_task_by_pid_ns(pid, &init_pid_ns); ...}kthreadd_task 实际对应 kthreaddkernel/kthread.cstruct task_struct *kthread_create_on_node(int (*threadfn)(void *data), void *data, int node, const char namefmt[], ...){ ... wake_up_process(kthreadd_task); ...}唤醒 kthread_task,实际就是kthreadd函数执行:#define kthread_create(threadfn, data, namefmt, arg...) \ kthread_create_on_node(threadfn, data, -1, namefmt, ##arg)/** * kthread_run - create and wake a thread. * @threadfn: the function to run until signal_pending(current). * @data: data ptr for @threadfn. * @namefmt: printf-style name for the thread. * * Description: Convenient wrapper for kthread_create() followed by * wake_up_process(). Returns the kthread or ERR_PTR(-ENOMEM). */#define kthread_run(threadfn, data, namefmt, ...) \({ \ struct task_struct *__k \ = kthread_create(threadfn, data, namefmt, ## __VA_ARGS__); \ if (!IS_ERR(__k)) \ wake_up_process(__k); \ __k; \})
0 0
- Kthread
- kthread
- KThread
- kthread usage
- kthread usage
- kthread usage
- kthread例子
- linuk kthread
- kthread schedule
- linux kthread
- kthread内核线程
- 内核线程结构--KTHREAD
- Linux内核线程kthread
- 通过KTHREAD获得SSSDT表
- 【Linux API】kthread的使用
- Linux 中的IPC(二)-----内核线程(Kthread)
- 运行不息的内核线程kthread
- 运行不息的内核线程kthread
- hdoj 1431 素数回文
- Eclipse与MyEclipse的联系和区别
- [查异常网]-20160405-Java异常处理和设计
- Android 6.0 使用 HttpClient
- Android屏幕适配
- kthread
- 深入理解Objective-C的Runtime机制
- 转发与重定向的区别
- const限定符
- 云舒天气上线啦
- 非常安全的加密方式
- 结构体位制
- AndroidStudio下初涉NDK开发
- 类与对象