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
|
@ -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…
Reference in New Issue