projects
/
musl
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
0bd8a4621116bba5f49c9e70478ce856adb88239
[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
}