diff --git a/arch/arc/include/nano_private.h b/arch/arc/include/nano_private.h index 19d0c4ef594..2ef3844f398 100644 --- a/arch/arc/include/nano_private.h +++ b/arch/arc/include/nano_private.h @@ -220,8 +220,10 @@ struct s_NANO { #if defined(CONFIG_NANO_TIMEOUTS) || defined(CONFIG_NANO_TIMERS) sys_dlist_t timeout_q; +#ifndef CONFIG_KERNEL_V2 int32_t task_timeout; #endif +#endif }; typedef struct s_NANO tNANO; diff --git a/arch/arm/include/nano_private.h b/arch/arm/include/nano_private.h index 1607c797e47..758b7ca0301 100644 --- a/arch/arm/include/nano_private.h +++ b/arch/arm/include/nano_private.h @@ -255,8 +255,10 @@ struct s_NANO { #if defined(CONFIG_NANO_TIMEOUTS) || defined(CONFIG_NANO_TIMERS) sys_dlist_t timeout_q; +#ifndef CONFIG_KERNEL_V2 int32_t task_timeout; #endif +#endif #ifdef CONFIG_KERNEL_V2 struct ready_q ready_q; #endif diff --git a/arch/nios2/include/nano_private.h b/arch/nios2/include/nano_private.h index 9f706467b0d..d92f0fc036d 100644 --- a/arch/nios2/include/nano_private.h +++ b/arch/nios2/include/nano_private.h @@ -141,8 +141,10 @@ struct s_NANO { #if defined(CONFIG_NANO_TIMEOUTS) || defined(CONFIG_NANO_TIMERS) sys_dlist_t timeout_q; +#ifndef CONFIG_KERNEL_V2 int32_t task_timeout; #endif +#endif #if defined(CONFIG_THREAD_MONITOR) struct tcs *threads; /* singly linked list of ALL fiber+tasks */ #endif diff --git a/arch/x86/include/nano_private.h b/arch/x86/include/nano_private.h index 2866935dab2..a521f2be87b 100644 --- a/arch/x86/include/nano_private.h +++ b/arch/x86/include/nano_private.h @@ -795,8 +795,10 @@ typedef struct s_NANO { #endif /* CONFIG_FP_SHARING */ #if defined(CONFIG_NANO_TIMEOUTS) || defined(CONFIG_NANO_TIMERS) sys_dlist_t timeout_q; +#ifndef CONFIG_KERNEL_V2 int32_t task_timeout; #endif +#endif #ifdef CONFIG_KERNEL_V2 struct ready_q ready_q; #endif diff --git a/kernel/unified/include/wait_q.h b/kernel/unified/include/wait_q.h index be2b3fcf81a..6987d35c339 100644 --- a/kernel/unified/include/wait_q.h +++ b/kernel/unified/include/wait_q.h @@ -89,8 +89,6 @@ static inline void _timeout_remove_tcs_from_wait_q(struct tcs *tcs) _timeout_add(thread, pq, ticks); \ } \ } while (0) - #define _TIMEOUT_SET_TASK_TIMEOUT(ticks) \ - _nanokernel.task_timeout = (ticks) #define _TIMEOUT_UPDATE(timeout, limit, cur_ticks) \ do { \ @@ -106,7 +104,6 @@ static inline void _timeout_remove_tcs_from_wait_q(struct tcs *tcs) #define _TIMEOUT_TICK_GET() 0 #define _TIMEOUT_ADD(thread, pq, ticks) do { } while (0) - #define _TIMEOUT_SET_TASK_TIMEOUT(ticks) do { } while ((0)) #define _TIMEOUT_UPDATE(timeout, limit, cur_ticks) do { } while (0) #else #define _timeout_tcs_init(tcs) do { } while ((0)) @@ -115,13 +112,11 @@ static inline void _timeout_remove_tcs_from_wait_q(struct tcs *tcs) #define _TIMEOUT_TICK_GET() 0 #define _TIMEOUT_ADD(thread, pq, ticks) do { } while (0) - #define _TIMEOUT_SET_TASK_TIMEOUT(ticks) do { } while ((0)) #define _TIMEOUT_UPDATE(timeout, limit, cur_ticks) do { } while (0) #endif #define _NANO_OBJECT_WAIT(queue, data, timeout, key) \ do { \ - _TIMEOUT_SET_TASK_TIMEOUT(timeout); \ nano_cpu_atomic_idle(key); \ key = irq_lock(); \ } while (0) diff --git a/kernel/unified/init.c b/kernel/unified/init.c index 4a60d5dc4cf..e91f34c24ef 100644 --- a/kernel/unified/init.c +++ b/kernel/unified/init.c @@ -105,7 +105,6 @@ char __noinit __stack _interrupt_stack[CONFIG_ISR_STACK_SIZE]; #include #define initialize_timeouts() do { \ sys_dlist_init(&_nanokernel.timeout_q); \ - _nanokernel.task_timeout = TICKS_UNLIMITED; \ } while ((0)) #else #define initialize_timeouts() do { } while ((0)) diff --git a/kernel/unified/sys_clock.c b/kernel/unified/sys_clock.c index 67e05a45e70..ec228be87d1 100644 --- a/kernel/unified/sys_clock.c +++ b/kernel/unified/sys_clock.c @@ -155,8 +155,6 @@ static inline void handle_expired_timeouts(int32_t ticks) struct _timeout *head = (struct _timeout *)sys_dlist_peek_head(&_timeout_q); - _nanokernel.task_timeout = TICKS_UNLIMITED; - K_DEBUG("head: %p, delta: %d\n", head, head ? head->delta_ticks_from_prev : -2112);