aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/init_task.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/init_task.h')
-rw-r--r--include/linux/init_task.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/init_task.h b/include/linux/init_task.h
index f8834f820ec2..325f649d77ff 100644
--- a/include/linux/init_task.h
+++ b/include/linux/init_task.h
@@ -15,6 +15,8 @@
15#include <net/net_namespace.h> 15#include <net/net_namespace.h>
16#include <linux/sched/rt.h> 16#include <linux/sched/rt.h>
17 17
18#include <asm/thread_info.h>
19
18#ifdef CONFIG_SMP 20#ifdef CONFIG_SMP
19# define INIT_PUSHABLE_TASKS(tsk) \ 21# define INIT_PUSHABLE_TASKS(tsk) \
20 .pushable_tasks = PLIST_NODE_INIT(tsk.pushable_tasks, MAX_PRIO), 22 .pushable_tasks = PLIST_NODE_INIT(tsk.pushable_tasks, MAX_PRIO),
@@ -183,12 +185,21 @@ extern struct task_group root_task_group;
183# define INIT_KASAN(tsk) 185# define INIT_KASAN(tsk)
184#endif 186#endif
185 187
188#ifdef CONFIG_THREAD_INFO_IN_TASK
189# define INIT_TASK_TI(tsk) \
190 .thread_info = INIT_THREAD_INFO(tsk), \
191 .stack_refcount = ATOMIC_INIT(1),
192#else
193# define INIT_TASK_TI(tsk)
194#endif
195
186/* 196/*
187 * INIT_TASK is used to set up the first task table, touch at 197 * INIT_TASK is used to set up the first task table, touch at
188 * your own risk!. Base=0, limit=0x1fffff (=2MB) 198 * your own risk!. Base=0, limit=0x1fffff (=2MB)
189 */ 199 */
190#define INIT_TASK(tsk) \ 200#define INIT_TASK(tsk) \
191{ \ 201{ \
202 INIT_TASK_TI(tsk) \
192 .state = 0, \ 203 .state = 0, \
193 .stack = init_stack, \ 204 .stack = init_stack, \
194 .usage = ATOMIC_INIT(2), \ 205 .usage = ATOMIC_INIT(2), \