mirror of
https://github.com/apache/nuttx.git
synced 2026-08-03 21:29:02 +00:00
sched:add holder in sem_trywait
Avoid priority rollover Signed-off-by: anjiahao <anjiahao@xiaomi.com>
This commit is contained in:
parent
b10dcf7c0d
commit
9a53601ba9
1 changed files with 1 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue