blob: 2c620d7ac432dd7e94fe45a65a113d75fee6af0b [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002#ifndef _LINUX__INIT_TASK_H
3#define _LINUX__INIT_TASK_H
4
Dipankar Sarmaab2af1f2005-09-09 13:04:13 -07005#include <linux/rcupdate.h>
Ingo Molnarde30a2b2006-07-03 00:24:42 -07006#include <linux/irqflags.h>
Serge E. Hallyn4865ecf2006-10-02 02:18:14 -07007#include <linux/utsname.h>
Ingo Molnarfbb9ce952006-07-03 00:24:50 -07008#include <linux/lockdep.h>
Steven Rostedt5ac9f622009-03-25 20:55:00 -04009#include <linux/ftrace.h>
Kirill Korotaev73ea4132006-10-02 02:18:20 -070010#include <linux/ipc.h>
Cedric Le Goater9a575a92006-12-08 02:37:59 -080011#include <linux/pid_namespace.h>
Cedric Le Goateracce2922007-07-15 23:40:59 -070012#include <linux/user_namespace.h>
Andrew G. Morgan3898b1b2008-04-28 02:13:40 -070013#include <linux/securebits.h>
Frederic Weisbecker6a616712012-12-16 20:00:34 +010014#include <linux/seqlock.h>
Peter Zijlstrafb00aca2013-11-07 14:43:43 +010015#include <linux/rbtree.h>
Elena Reshetovaf0b89d32019-01-18 14:27:30 +020016#include <linux/refcount.h>
Ingo Molnardfc34012017-02-03 23:15:21 +010017#include <linux/sched/autogroup.h>
Eric W. Biederman772698f2007-09-12 11:55:17 +020018#include <net/net_namespace.h>
Ingo Molnar77852fe2013-02-16 09:46:48 +010019#include <linux/sched/rt.h>
Josh Poimboeufd83a7cb2017-02-13 19:42:40 -060020#include <linux/livepatch.h>
Ingo Molnar589ee622017-02-04 00:16:44 +010021#include <linux/mm_types.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070022
Andy Lutomirskic65eacb2016-09-13 14:29:24 -070023#include <asm/thread_info.h>
24
Al Virof52111b2008-05-08 18:19:16 -040025extern struct files_struct init_files;
Al Viro18d8fda2008-12-26 00:35:37 -050026extern struct fs_struct init_fs;
David Howells3678e2f2018-01-02 15:12:01 +000027extern struct nsproxy init_nsproxy;
28extern struct group_info init_groups;
29extern struct cred init_cred;
Linus Torvalds1da177e2005-04-16 15:20:36 -070030
Peter Zijlstra9d7fb042015-06-30 11:30:54 +020031#ifndef CONFIG_VIRT_CPU_ACCOUNTING_NATIVE
32#define INIT_PREV_CPUTIME(x) .prev_cputime = { \
33 .lock = __RAW_SPIN_LOCK_UNLOCKED(x.prev_cputime.lock), \
34},
35#else
36#define INIT_PREV_CPUTIME(x)
37#endif
38
Carsten Emdef1c6f1a2011-10-26 23:14:16 +020039#define INIT_TASK_COMM "swapper"
40
Tim Abbott857ecee2009-06-23 19:59:36 -040041/* Attach to the init_task data structure for proper alignment */
David Howellsd11ed3a2018-01-02 15:12:01 +000042#ifdef CONFIG_ARCH_TASK_STRUCT_ON_STACK
Tim Abbott2af76872010-02-20 01:03:35 +010043#define __init_task_data __attribute__((__section__(".data..init_task")))
David Howellsd11ed3a2018-01-02 15:12:01 +000044#else
45#define __init_task_data /**/
46#endif
Tim Abbott857ecee2009-06-23 19:59:36 -040047
David Howells05008712018-01-02 15:12:01 +000048/* Attach to the thread_info data structure for proper alignment */
49#define __init_thread_info __attribute__((__section__(".data..init_thread_info")))
50
Linus Torvalds1da177e2005-04-16 15:20:36 -070051#endif