cut out a syscall on thread creation in the case where guard size is 0
[musl] / src / thread / sem_post.c
1 #include <semaphore.h>
2 #include "pthread_impl.h"
3
4 int sem_post(sem_t *sem)
5 {
6         if (!a_fetch_add(sem->__val, 1))
7                 __wake(sem->__val, 1, 0);
8         return 0;
9 }