semop.c 235 字节
Newer Older
R
Rich Felker 已提交
1 2 3 4 5 6
#include <sys/sem.h>
#include "syscall.h"
#include "ipc.h"

int semop(int id, struct sembuf *buf, size_t n)
{
7
#ifndef SYS_ipc
8
	return syscall(SYS_semop, id, buf, n);
R
Rich Felker 已提交
9
#else
10
	return syscall(SYS_ipc, IPCOP_semop, id, n, 0, buf);
R
Rich Felker 已提交
11 12
#endif
}