]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blame - include/linux/init_task.h
Merge branch 'for-4.17/dax' into libnvdimm-for-next
[mirror_ubuntu-jammy-kernel.git] / include / linux / init_task.h
CommitLineData
b2441318 1/* SPDX-License-Identifier: GPL-2.0 */
1da177e4
LT
2#ifndef _LINUX__INIT_TASK_H
3#define _LINUX__INIT_TASK_H
4
ab2af1f5 5#include <linux/rcupdate.h>
de30a2b3 6#include <linux/irqflags.h>
4865ecf1 7#include <linux/utsname.h>
fbb9ce95 8#include <linux/lockdep.h>
5ac9f622 9#include <linux/ftrace.h>
73ea4130 10#include <linux/ipc.h>
9a575a92 11#include <linux/pid_namespace.h>
acce292c 12#include <linux/user_namespace.h>
3898b1b4 13#include <linux/securebits.h>
6a61671b 14#include <linux/seqlock.h>
fb00aca4 15#include <linux/rbtree.h>
dfc3401a 16#include <linux/sched/autogroup.h>
772698f6 17#include <net/net_namespace.h>
77852fea 18#include <linux/sched/rt.h>
d83a7cb3 19#include <linux/livepatch.h>
589ee628 20#include <linux/mm_types.h>
1da177e4 21
c65eacbe
AL
22#include <asm/thread_info.h>
23
f52111b1 24extern struct files_struct init_files;
18d8fda7 25extern struct fs_struct init_fs;
3678e2fc
DH
26extern struct nsproxy init_nsproxy;
27extern struct group_info init_groups;
28extern struct cred init_cred;
1da177e4 29
9d7fb042
PZ
30#ifndef CONFIG_VIRT_CPU_ACCOUNTING_NATIVE
31#define INIT_PREV_CPUTIME(x) .prev_cputime = { \
32 .lock = __RAW_SPIN_LOCK_UNLOCKED(x.prev_cputime.lock), \
33},
34#else
35#define INIT_PREV_CPUTIME(x)
36#endif
37
b18b6a9c 38#ifdef CONFIG_POSIX_TIMERS
b18b6a9c
NP
39#define INIT_CPU_TIMERS(s) \
40 .cpu_timers = { \
41 LIST_HEAD_INIT(s.cpu_timers[0]), \
42 LIST_HEAD_INIT(s.cpu_timers[1]), \
3678e2fc 43 LIST_HEAD_INIT(s.cpu_timers[2]), \
b18b6a9c
NP
44 },
45#else
b18b6a9c 46#define INIT_CPU_TIMERS(s)
b18b6a9c
NP
47#endif
48
820e45db
SB
49#define INIT_PID_LINK(type) \
50{ \
51 .node = { \
52 .next = NULL, \
f2001145 53 .pprev = NULL, \
820e45db
SB
54 }, \
55 .pid = &init_struct_pid, \
56}
57
f1c6f1a7
CE
58#define INIT_TASK_COMM "swapper"
59
857eceeb 60/* Attach to the init_task data structure for proper alignment */
d11ed3ab 61#ifdef CONFIG_ARCH_TASK_STRUCT_ON_STACK
2af7687f 62#define __init_task_data __attribute__((__section__(".data..init_task")))
d11ed3ab
DH
63#else
64#define __init_task_data /**/
65#endif
857eceeb 66
0500871f
DH
67/* Attach to the thread_info data structure for proper alignment */
68#define __init_thread_info __attribute__((__section__(".data..init_thread_info")))
69
1da177e4 70#endif