about summary refs log tree commit diff
path: root/src/ipc/msgsnd.c
blob: 1e0b2fa50dfc0e7cf52bdd2d3d9e4599d53a4023 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <sys/msg.h>
#include "syscall.h"
#include "ipc.h"
#include "libc.h"

int msgsnd(int q, const void *m, size_t len, int flag)
{
	ssize_t r;
	CANCELPT_BEGIN;
#ifdef SYS_msgsnd
	r = syscall(SYS_msgsnd, q, m, len, flag);
#else
	r = syscall(SYS_ipc, IPCOP_msgsnd, q, len, flag, m);
#endif
	CANCELPT_END;
	return r;
}