some of these definitions were just plain wrong, others based on outdated ancient "non-64" versions of the kernel interface. as much as possible has now been moved out of bits/* these changes break abi (the old abi for these functions was wrong), but since they were not working anyway it can hardly matter.
19 lines
363 B
C
19 lines
363 B
C
#include <sys/sem.h>
|
|
#include <stdarg.h>
|
|
#include "syscall.h"
|
|
#include "ipc.h"
|
|
|
|
int semctl(int id, int num, int cmd, ...)
|
|
{
|
|
long arg;
|
|
va_list ap;
|
|
va_start(ap, cmd);
|
|
arg = va_arg(ap, long);
|
|
va_end(ap);
|
|
#ifdef SYS_semctl
|
|
return syscall(SYS_semctl, id, num, cmd | 0x100, arg);
|
|
#else
|
|
return syscall(SYS_ipc, IPCOP_semctl, id, num, cmd | 0x100, &arg);
|
|
#endif
|
|
}
|