projects
/
oweals
/
musl.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
numerous fixes to sysv ipc
[oweals/musl.git]
/
src
/
ipc
/
semctl.c
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 | 0x100, arg);
15
#else
16
return syscall(SYS_ipc, IPCOP_semctl, id, num, cmd | 0x100, &arg);
17
#endif
18
}