#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;
}
#ifdef TEST
int
main(void) {
return 0;
}
#endif
![]() |
index : grovel | |
| Unnamed repository; edit this file 'description' to name the repository. | External SSH Git service user |
| aboutsummaryrefslogtreecommitdiff |
#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;
}
#ifdef TEST
int
main(void) {
return 0;
}
#endif