projects
/
oweals
/
musl.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
simplify pthread tsd key handling
[oweals/musl.git]
/
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
}