From 3ffe5bfb8c0494a1f7a31766f69e7a2165278f56 Mon Sep 17 00:00:00 2001 From: Peter Mitsis Date: Fri, 9 Sep 2016 14:20:55 -0400 Subject: [PATCH] unified: Include _timeout structure in tcs_base The '_timeout' structure is needed by dummy threads so that they can handle timeouts. Change-Id: Iefabd6ad93c8e176e95ce4262f5f3544dc90b7d5 Signed-off-by: Peter Mitsis --- arch/arm/include/nano_private.h | 9 ++++++--- arch/x86/include/nano_private.h | 9 ++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/arch/arm/include/nano_private.h b/arch/arm/include/nano_private.h index 649313682e6..1607c797e47 100644 --- a/arch/arm/include/nano_private.h +++ b/arch/arm/include/nano_private.h @@ -168,6 +168,9 @@ struct tcs_base { uint32_t flags; int prio; void *swap_data; +#ifdef CONFIG_NANO_TIMEOUTS + struct _timeout timeout; +#endif }; #endif @@ -177,6 +180,9 @@ struct tcs { uint32_t flags; int prio; void *swap_data; +#ifdef CONFIG_NANO_TIMEOUTS + struct _timeout timeout; +#endif #else struct tcs *link; /* singly-linked list in _nanokernel.fibers */ uint32_t flags; @@ -204,9 +210,6 @@ struct tcs { #endif #endif #ifdef CONFIG_KERNEL_V2 -#ifdef CONFIG_NANO_TIMEOUTS - struct _timeout timeout; -#endif atomic_t sched_locked; void *init_data; void (*fn_abort)(void); diff --git a/arch/x86/include/nano_private.h b/arch/x86/include/nano_private.h index 4e48c5e288b..68a8af49b8b 100644 --- a/arch/x86/include/nano_private.h +++ b/arch/x86/include/nano_private.h @@ -640,6 +640,9 @@ struct tcs_base { uint32_t flags; int prio; /* thread priority used to sort linked list */ void *swap_data; +#ifdef CONFIG_NANO_TIMEOUTS + struct _timeout timeout; +#endif }; #endif @@ -662,6 +665,9 @@ struct tcs { int flags; int prio; /* thread priority used to sort linked list */ void *swap_data; +#ifdef CONFIG_NANO_TIMEOUTS + struct _timeout timeout; +#endif #else struct tcs *link; @@ -722,9 +728,6 @@ struct tcs { #endif #ifdef CONFIG_KERNEL_V2 -#ifdef CONFIG_NANO_TIMEOUTS - struct _timeout timeout; -#endif atomic_t sched_locked; void *init_data; void (*fn_abort)(void);