aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/kthread.h14
-rw-r--r--include/linux/sched.h1
2 files changed, 11 insertions, 4 deletions
diff --git a/include/linux/kthread.h b/include/linux/kthread.h
index 7ff16f7d3ed..1e923e5e88e 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
7struct task_struct *kthread_create(int (*threadfn)(void *data), 7struct 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
35int kthreadd(void *unused); 40int kthreadd(void *unused);
36extern struct task_struct *kthreadd_task; 41extern struct task_struct *kthreadd_task;
42extern 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.
diff --git a/include/linux/sched.h b/include/linux/sched.h
index c15936fe998..4b601be3dac 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1471,6 +1471,7 @@ struct task_struct {
1471#ifdef CONFIG_NUMA 1471#ifdef CONFIG_NUMA
1472 struct mempolicy *mempolicy; /* Protected by alloc_lock */ 1472 struct mempolicy *mempolicy; /* Protected by alloc_lock */
1473 short il_next; 1473 short il_next;
1474 short pref_node_fork;
1474#endif 1475#endif
1475 atomic_t fs_excl; /* holding fs exclusive resources */ 1476 atomic_t fs_excl; /* holding fs exclusive resources */
1476 struct rcu_head rcu; 1477 struct rcu_head rcu;