aboutsummaryrefslogtreecommitdiffstats
path: root/init/init_task.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2018-01-02 15:12:01 +0000
committerDavid Howells <dhowells@redhat.com>2018-01-17 11:30:16 +0000
commit3678e2fcc293cf2ff1fe961838734a70c185de8a (patch)
tree3c0836a94c144ee50400efe4a2d8a344f4c9060f /init/init_task.c
parentExpand various INIT_* macros and remove (diff)
downloadlinux-dev-3678e2fcc293cf2ff1fe961838734a70c185de8a.tar.xz
linux-dev-3678e2fcc293cf2ff1fe961838734a70c185de8a.zip
Expand the INIT_SIGNALS and INIT_SIGHAND macros and remove
There doesn't seem to be any need to have the INIT_SIGNALS and INIT_SIGHAND macros, so expand them in their single places of use and remove them. Signed-off-by: David Howells <dhowells@redhat.com> Tested-by: Tony Luck <tony.luck@intel.com> Tested-by: Will Deacon <will.deacon@arm.com> (arm64) Tested-by: Palmer Dabbelt <palmer@sifive.com> Acked-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'init/init_task.c')
-rw-r--r--init/init_task.c30
1 files changed, 28 insertions, 2 deletions
diff --git a/init/init_task.c b/init/init_task.c
index aa4030a939e5..3ac6e754cf64 100644
--- a/init/init_task.c
+++ b/init/init_task.c
@@ -13,8 +13,34 @@
#include <asm/pgtable.h>
#include <linux/uaccess.h>
-static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
-static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
+static struct signal_struct init_signals = {
+ .nr_threads = 1,
+ .thread_head = LIST_HEAD_INIT(init_task.thread_node),
+ .wait_chldexit = __WAIT_QUEUE_HEAD_INITIALIZER(init_signals.wait_chldexit),
+ .shared_pending = {
+ .list = LIST_HEAD_INIT(init_signals.shared_pending.list),
+ .signal = {{0}}
+ },
+ .rlim = INIT_RLIMITS,
+ .cred_guard_mutex = __MUTEX_INITIALIZER(init_signals.cred_guard_mutex),
+#ifdef CONFIG_POSIX_TIMERS
+ .posix_timers = LIST_HEAD_INIT(init_signals.posix_timers),
+ .cputimer = {
+ .cputime_atomic = INIT_CPUTIME_ATOMIC,
+ .running = false,
+ .checking_timer = false,
+ },
+#endif
+ INIT_CPU_TIMERS(init_signals)
+ INIT_PREV_CPUTIME(init_signals)
+};
+
+static struct sighand_struct init_sighand = {
+ .count = ATOMIC_INIT(1),
+ .action = { { { .sa_handler = SIG_DFL, } }, },
+ .siglock = __SPIN_LOCK_UNLOCKED(init_sighand.siglock),
+ .signalfd_wqh = __WAIT_QUEUE_HEAD_INITIALIZER(init_sighand.signalfd_wqh),
+};
/*
* Set up the first task table, touch at your own risk!. Base=0,