sched/semaphore: increase sem count when holder task exit

Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
This commit is contained in:
zhangyuan21 2023-01-18 14:33:52 +08:00 committed by Xiang Xiao
parent 98e47a1770
commit 01741a0b65

View file

@ -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++;
}
}