diff options
| author | Len Brown <len.brown@intel.com> | 2011-03-23 02:34:54 -0400 |
|---|---|---|
| committer | Len Brown <len.brown@intel.com> | 2011-03-23 02:34:54 -0400 |
| commit | 02e2407858fd62053bf60349c0e72cd1c7a4a60e (patch) | |
| tree | 0ebdbddc97d3abbc675916010e7771065b70c137 /include/linux/kthread.h | |
| parent | 96e1c408ea8a556c5b51e0e7d56bd2afbfbf5fe9 (diff) | |
| parent | 6447f55da90b77faec1697d499ed7986bb4f6de6 (diff) | |
Merge branch 'linus' into release
Conflicts:
arch/x86/kernel/acpi/sleep.c
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'include/linux/kthread.h')
| -rw-r--r-- | include/linux/kthread.h | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/include/linux/kthread.h b/include/linux/kthread.h index ce0775aa64c3..1e923e5e88e8 100644 --- a/include/linux/kthread.h +++ b/include/linux/kthread.h | |||
| @@ -4,10 +4,15 @@ | |||
| 4 | #include <linux/err.h> | 4 | #include <linux/err.h> |
| 5 | #include <linux/sched.h> | 5 | #include <linux/sched.h> |
| 6 | 6 | ||
| 7 | struct task_struct *kthread_create(int (*threadfn)(void *data), | 7 | struct task_struct *kthread_create_on_node(int (*threadfn)(void *data), |
| 8 | void *data, | 8 | void *data, |
| 9 | const char namefmt[], ...) | 9 | int node, |
| 10 | __attribute__((format(printf, 3, 4))); | 10 | const char namefmt[], ...) |
| 11 | __attribute__((format(printf, 4, 5))); | ||
| 12 | |||
| 13 | #define kthread_create(threadfn, data, namefmt, arg...) \ | ||
| 14 | kthread_create_on_node(threadfn, data, -1, namefmt, ##arg) | ||
| 15 | |||
| 11 | 16 | ||
| 12 | /** | 17 | /** |
| 13 | * kthread_run - create and wake a thread. | 18 | * kthread_run - create and wake a thread. |
| @@ -34,6 +39,7 @@ void *kthread_data(struct task_struct *k); | |||
| 34 | 39 | ||
| 35 | int kthreadd(void *unused); | 40 | int kthreadd(void *unused); |
| 36 | extern struct task_struct *kthreadd_task; | 41 | extern struct task_struct *kthreadd_task; |
| 42 | extern int tsk_fork_get_node(struct task_struct *tsk); | ||
| 37 | 43 | ||
| 38 | /* | 44 | /* |
| 39 | * Simple work processor based on kthread. | 45 | * Simple work processor based on kthread. |
| @@ -64,7 +70,7 @@ struct kthread_work { | |||
| 64 | }; | 70 | }; |
| 65 | 71 | ||
| 66 | #define KTHREAD_WORKER_INIT(worker) { \ | 72 | #define KTHREAD_WORKER_INIT(worker) { \ |
| 67 | .lock = SPIN_LOCK_UNLOCKED, \ | 73 | .lock = __SPIN_LOCK_UNLOCKED((worker).lock), \ |
| 68 | .work_list = LIST_HEAD_INIT((worker).work_list), \ | 74 | .work_list = LIST_HEAD_INIT((worker).work_list), \ |
| 69 | } | 75 | } |
| 70 | 76 | ||
