mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 00:14:22 +08:00
sem: remove limitation of irq context when do sem_trywait
Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
@@ -69,9 +69,11 @@ int nxsem_trywait(FAR sem_t *sem)
|
||||
irqstate_t flags;
|
||||
int ret;
|
||||
|
||||
#ifndef CONFIG_DEBUG_MM
|
||||
/* This API should not be called from interrupt handlers */
|
||||
|
||||
DEBUGASSERT(sem != NULL && up_interrupt_context() == false);
|
||||
#endif
|
||||
|
||||
if (sem != NULL)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user