1
0
mirror of https://github.com/fluencelabs/musl synced 2025-06-07 03:51:36 +00:00

11 lines
158 B
C
Raw Normal View History

2011-03-04 00:45:59 -05:00
#include <semaphore.h>
#include "pthread_impl.h"
int sem_post(sem_t *sem)
{
a_inc(sem->__val);
if (sem->__val[1])
2011-03-04 00:45:59 -05:00
__wake(sem->__val, 1, 0);
return 0;
}