sched/semaphore: increase sem count when holder task exit
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
This commit is contained in:
parent
98e47a1770
commit
01741a0b65
1 changed files with 6 additions and 0 deletions
|
@ -1049,6 +1049,12 @@ void nxsem_release_all(FAR struct tcb_s *htcb)
|
|||
FAR sem_t *sem = pholder->sem;
|
||||
|
||||
nxsem_freeholder(sem, pholder);
|
||||
|
||||
/* Increment the count on the semaphore, to releases the count
|
||||
* that was taken by sem_wait() or sem_post().
|
||||
*/
|
||||
|
||||
sem->semcount++;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue