about summary refs log tree commit diff
path: root/src/ipc/msgsnd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ipc/msgsnd.c')
-rw-r--r--src/ipc/msgsnd.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/ipc/msgsnd.c b/src/ipc/msgsnd.c
new file mode 100644
index 00000000..ed05d6b3
--- /dev/null
+++ b/src/ipc/msgsnd.c
@@ -0,0 +1,17 @@
+#include <sys/msg.h>
+#include "syscall.h"
+#include "ipc.h"
+#include "libc.h"
+
+ssize_t msgsnd(int q, const void *m, size_t len, int flag)
+{
+	ssize_t r;
+	CANCELPT_BEGIN;
+#ifdef __NR_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;
+}