blob: c0b7762d3e11bb25e1ad0b66b6e4af3d3133da41 [file] [log] [blame]
#include <semaphore.h>
#include <limits.h>
int sem_getvalue(sem_t *restrict sem, int *restrict valp)
{
int val = sem->__val[0];
*valp = val & SEM_VALUE_MAX;
return 0;
}