sched/semaphore: Fix a bug in posting mutex
There was a logical error in setting blocking bit when releasing another thread Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
This commit is contained in:
parent
3cf0abbfee
commit
b5a284fd6d
1 changed files with 1 additions and 1 deletions
|
|
@ -198,7 +198,7 @@ int nxsem_post_slow(FAR sem_t *sem)
|
||||||
if (mutex)
|
if (mutex)
|
||||||
{
|
{
|
||||||
uint32_t blocking_bit = dq_empty(SEM_WAITLIST(sem)) ?
|
uint32_t blocking_bit = dq_empty(SEM_WAITLIST(sem)) ?
|
||||||
NXSEM_MBLOCKING_BIT : 0;
|
0 : NXSEM_MBLOCKING_BIT;
|
||||||
atomic_set(NXSEM_MHOLDER(sem),
|
atomic_set(NXSEM_MHOLDER(sem),
|
||||||
((uint32_t)stcb->pid) | blocking_bit);
|
((uint32_t)stcb->pid) | blocking_bit);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue