From 6c144b5c9136c4a62a5fa40b121a891b3c2b5b1d Mon Sep 17 00:00:00 2001 From: Adrien Ricciardi Date: Tue, 26 Sep 2023 10:57:56 +0200 Subject: [PATCH] os: Removed two asserts in tpl_resume_all_interrupts_service() and tpl_resume_os_interrupts_service() because they were always true. The 'GET_LOCK_CNT_FOR_CORE' macro returns the 'tpl_locking_depth' variable, which is unsigned. Thus, checking if it is greater or equal to zero is always true. Signed-off-by: Adrien Ricciardi --- os/tpl_os_interrupt_kernel.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/os/tpl_os_interrupt_kernel.c b/os/tpl_os_interrupt_kernel.c index 109146474..c27d0c42f 100644 --- a/os/tpl_os_interrupt_kernel.c +++ b/os/tpl_os_interrupt_kernel.c @@ -132,9 +132,6 @@ FUNC(void, OS_CODE) tpl_suspend_all_interrupts_service(void) FUNC(void, OS_CODE) tpl_resume_all_interrupts_service(void) { GET_CURRENT_CORE_ID(core_id) - #if defined(__unix__) || defined(__APPLE__) - assert( GET_LOCK_CNT_FOR_CORE(tpl_locking_depth,core_id) >= 0 ); - #endif if( GET_LOCK_CNT_FOR_CORE(tpl_cpt_user_task_lock_All,core_id) != 0 ) { @@ -202,9 +199,6 @@ FUNC(void, OS_CODE) tpl_suspend_os_interrupts_service(void) FUNC(void, OS_CODE) tpl_resume_os_interrupts_service(void) { GET_CURRENT_CORE_ID(core_id) - #if defined(__unix__) || defined(__APPLE__) - assert(GET_LOCK_CNT_FOR_CORE(tpl_locking_depth,core_id) >= 0); - #endif if (GET_LOCK_CNT_FOR_CORE(tpl_cpt_user_task_lock_OS,core_id) != 0) {