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
add legacy getloadavg api
[musl.git]
/
src
/
ipc
/
semctl.c
blob
274e2cf333be25ad206e243f193dde1ff31a3442
1
#include <sys/sem.h>
2
#include <stdarg.h>
3
#include
"syscall.h"
4
#include
"ipc.h"
5
6
int
semctl
(
int
id
,
int
num
,
int
cmd
, ...)
7
{
8
long
arg
;
9
va_list
ap
;
10
va_start
(
ap
,
cmd
);
11
arg
=
va_arg
(
ap
,
long
);
12
va_end
(
ap
);
13
#ifdef SYS_semctl
14
return
syscall
(
SYS_semctl
,
id
,
num
,
cmd
|
IPC_64
,
arg
);
15
#else
16
return
syscall
(
SYS_ipc
,
IPCOP_semctl
,
id
,
num
,
cmd
|
IPC_64
, &
arg
);
17
#endif
18
}