projects
/
oweals
/
musl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
floating point environment, untested
[oweals/musl.git]
/
src
/
thread
/
sem_post.c
diff --git
a/src/thread/sem_post.c
b/src/thread/sem_post.c
index 0bd8a4621116bba5f49c9e70478ce856adb88239..8f4700c3058a4735516a5ae94330fb59df004234 100644
(file)
--- a/
src/thread/sem_post.c
+++ b/
src/thread/sem_post.c
@@
-3,7
+3,8
@@
int sem_post(sem_t *sem)
{
- if (!a_fetch_add(sem->__val, 1))
+ a_inc(sem->__val);
+ if (sem->__val[1])
__wake(sem->__val, 1, 0);
return 0;
}