1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- #ifndef _KERNEL_WORKQUEUE_INTERNAL_H
- #define _KERNEL_WORKQUEUE_INTERNAL_H
- #include <linux/workqueue.h>
- #include <linux/kthread.h>
- struct worker_pool;
- struct worker {
-
- union {
- struct list_head entry;
- struct hlist_node hentry;
- };
- struct work_struct *current_work;
- work_func_t current_func;
- struct pool_workqueue *current_pwq;
- bool desc_valid;
- struct list_head scheduled;
-
- struct task_struct *task;
- struct worker_pool *pool;
-
- struct list_head node;
-
- unsigned long last_active;
- unsigned int flags;
- int id;
-
- char desc[WORKER_DESC_LEN];
-
- struct workqueue_struct *rescue_wq;
- };
- static inline struct worker *current_wq_worker(void)
- {
- if (current->flags & PF_WQ_WORKER)
- return kthread_data(current);
- return NULL;
- }
- void wq_worker_waking_up(struct task_struct *task, int cpu);
- struct task_struct *wq_worker_sleeping(struct task_struct *task);
- #endif
|