sem_getvalue.c\thread\src - musl - musl - an implementation of the standard library for Linux-based systems

index : musl
musl - an implementation of the standard library for Linux-based systems
summary refs log tree commit diff
path: root/src/thread/sem_getvalue.c
blob: c0b7762d3e11bb25e1ad0b66b6e4af3d3133da41 (plain) (blame)
1
2
3
4
5
6
7
8
9
#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;
}
generated by cgit v1.2.1 (git 2.18.0) at 2025年09月10日 04:45:44 +0000

AltStyle によって変換されたページ (->オリジナル) /