mirror of
https://github.com/apache/nuttx.git
synced 2025-12-12 22:05:54 +08:00
sched:add holder in sem_trywait
Avoid priority rollover Signed-off-by: anjiahao <anjiahao@xiaomi.com>
This commit is contained in:
@@ -90,6 +90,7 @@ int nxsem_trywait(FAR sem_t *sem)
|
||||
/* It is, let the task take the semaphore */
|
||||
|
||||
sem->semcount--;
|
||||
nxsem_add_holder(sem);
|
||||
rtcb->waitsem = NULL;
|
||||
ret = OK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user