sched/semaphore: add the wdog judge before cancel
N/A to avoid entering critical again in wd_cancel when wdog not actived. But when the wdog is actived, may add more judge
This commit is contained in:
parent
1047b65ab5
commit
126ce6428e
@ -151,7 +151,10 @@ int nxsem_post(FAR sem_t *sem)
|
||||
|
||||
/* Stop the watchdog timer */
|
||||
|
||||
wd_cancel(&stcb->waitdog);
|
||||
if (WDOG_ISACTIVE(&stcb->waitdog))
|
||||
{
|
||||
wd_cancel(&stcb->waitdog);
|
||||
}
|
||||
|
||||
/* Restart the waiting task. */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user