forked from zephyrproject-rtos/zephyr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
posix: semaphore: fix bugs and simplify code
Modifies several functions that are causing wrong behaviour. * semaphore.h: add missing restrict keyword. * sem_destroy(): check that nobody is waiting before destroying the object. * sem_timedwait(): simpify function logic and fix a bug when abstime > currtime, that passed ticks instead of ms to k_sem_take(). * sem_wait(): avoid unnecessary checks. * sem_init(): add pshared value assertion. Signed-off-by: Juan Manuel Torres Palma <[email protected]>
- Loading branch information
1 parent
08418a2
commit 342da7a
Showing
2 changed files
with
29 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters