Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755945AbcDLF3b (ORCPT ); Tue, 12 Apr 2016 01:29:31 -0400 Received: from mail-oi0-f65.google.com ([209.85.218.65]:35157 "EHLO mail-oi0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755859AbcDLF33 (ORCPT ); Tue, 12 Apr 2016 01:29:29 -0400 From: "Bill Huey (hui)" To: Peter Zijlstra , Steven Rostedt , linux-kernel@vger.kernel.org Cc: Dario Faggioli , Alessandro Zummo , Thomas Gleixner , KY Srinivasan , Amir Frenkel , Bdale Garbee Subject: [PATCH RFC v0 04/12] Anonymous struct initialization Date: Mon, 11 Apr 2016 22:29:12 -0700 Message-Id: <1460438960-32060-5-git-send-email-bill.huey@gmail.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1460438960-32060-1-git-send-email-bill.huey@gmail.com> References: <1460438960-32060-1-git-send-email-bill.huey@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1254 Lines: 45 Anonymous struct initialization Signed-off-by: Bill Huey (hui) --- 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