Skip to content

Commit

Permalink
os: Removed two asserts in tpl_resume_all_interrupts_service() and tp…
Browse files Browse the repository at this point in the history
…l_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 <[email protected]>
  • Loading branch information
RICCIARDI-Adrien committed Sep 26, 2023
1 parent bdf9843 commit 6c144b5
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions os/tpl_os_interrupt_kernel.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
{
Expand Down Expand Up @@ -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)
{
Expand Down

0 comments on commit 6c144b5

Please sign in to comment.