Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1376468 > unrolled thread

[PATCH RFC v0 04/12] Anonymous struct initialization

Started by"Bill Huey (hui)" <bill.huey@gmail.com>
First post2016-04-12 07:30 +0200
Last post2016-04-12 07:30 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH RFC v0 04/12] Anonymous struct initialization "Bill Huey (hui)" <bill.huey@gmail.com> - 2016-04-12 07:30 +0200

#1376468 — [PATCH RFC v0 04/12] Anonymous struct initialization

From"Bill Huey (hui)" <bill.huey@gmail.com>
Date2016-04-12 07:30 +0200
Subject[PATCH RFC v0 04/12] Anonymous struct initialization
Message-ID<rmZ3H-1MB-1@gated-at.bofh.it>
Anonymous struct initialization

Signed-off-by: Bill Huey (hui) <bill.huey@gmail.com>
---
 include/linux/init_task.h | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/include/linux/init_task.h b/include/linux/init_task.h
index f2cb8d4..308caf6 100644
--- a/include/linux/init_task.h
+++ b/include/linux/init_task.h
@@ -183,6 +183,23 @@ extern struct task_group root_task_group;
 # define INIT_KASAN(tsk)
 #endif
 
+#ifdef CONFIG_RTC_CYCLIC
+# define INIT_RT_OVERRUN(tsk)						\
+		.rt_overrun	= {					\
+			.count = 0,					\
+			.task_list = LIST_HEAD_INIT(tsk.rt.rt_overrun.task_list), \
+			.type = 0,					\
+			.color = 0,					\
+			.slots = 0,					\
+			.yield = 0,					\
+			.machine_state = 0,				\
+			.last_machine_state = 0,			\
+			.last_task_state = 0,				\
+		},
+#else
+# define INIT_RT_OVERRUN
+#endif
+
 /*
  *  INIT_TASK is used to set up the first task table, touch at
  * your own risk!. Base=0, limit=0x1fffff (=2MB)
@@ -210,6 +227,7 @@ extern struct task_group root_task_group;
 	.rt		= {						\
 		.run_list	= LIST_HEAD_INIT(tsk.rt.run_list),	\
 		.time_slice	= RR_TIMESLICE,				\
+		INIT_RT_OVERRUN(tsk)					\
 	},								\
 	.tasks		= LIST_HEAD_INIT(tsk.tasks),			\
 	INIT_PUSHABLE_TASKS(tsk)					\
-- 
2.5.0

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web