freebsd-nq/lib/libc/gen/semctl.c
John Birrell e91bce7ac7 NetBSD implements semctl using a __semctl syscall instead of the
semsys syscall that FreeBSD kernels use. Grumble. So make the call
dependent on if __NETBSD_SYSCALLS is defined.
1998-03-09 04:39:13 +00:00

20 lines
385 B
C

#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/sem.h>
#if __STDC__
int semctl(int semid, int semnum, int cmd, union semun semun)
#else
int semctl(semid, int semnum, cmd, semun)
int semid, semnum;
int cmd;
union semun semun;
#endif
{
#ifdef __NETBSD_SYSCALLS
return (__semctl(semid, semnum, cmd, &semun));
#else
return (semsys(0, semid, semnum, cmd, &semun));
#endif
}