repo.or.cz
/
musl.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
iconv: add euro symbol to GBK as single byte 0x80
[musl.git]
/
src
/
thread
/
sem_getvalue.c
blob
c0b7762d3e11bb25e1ad0b66b6e4af3d3133da41
1
#include <semaphore.h>
2
#include <limits.h>
3
4
int
sem_getvalue
(
sem_t
*
restrict sem
,
int
*
restrict valp
)
5
{
6
int
val
=
sem
->
__val
[
0
];
7
*
valp
=
val
&
SEM_VALUE_MAX
;
8
return
0
;
9
}