提交 4571f9f8 编写于 作者: R Rich Felker

implement semtimedop

this is a Linux-specific extension to the sysv semaphore api.
上级 f5980e33
#define IPCOP_semop 1
#define IPCOP_semget 2
#define IPCOP_semctl 3
#define IPCOP_semtimedop 4
#define IPCOP_msgsnd 11
#define IPCOP_msgrcv 12
#define IPCOP_msgget 13
......
#define _GNU_SOURCE
#include <sys/sem.h>
#include "syscall.h"
#include "ipc.h"
int semtimedop(int id, struct sembuf *buf, size_t n, const struct timespec *ts)
{
#ifdef SYS_semop
return syscall(SYS_semtimedop, id, buf, n, ts);
#else
return syscall(SYS_ipc, IPCOP_semtimedop, id, n, 0, buf, ts);
#endif
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册