musl - musl - an implementation of the standard library for Linux-based systems

index : musl
musl - an implementation of the standard library for Linux-based systems
summary refs log tree commit diff
path: root/src/ipc/msgrcv.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ipc/msgrcv.c')
-rw-r--r--src/ipc/msgrcv.c 17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/ipc/msgrcv.c b/src/ipc/msgrcv.c
new file mode 100644
index 00000000..ee071766
--- /dev/null
+++ b/src/ipc/msgrcv.c
@@ -0,0 +1,17 @@
+#include <sys/msg.h>
+#include "syscall.h"
+#include "ipc.h"
+#include "libc.h"
+
+ssize_t msgrcv(int q, void *m, size_t len, long type, int flag)
+{
+ ssize_t r;
+ CANCELPT_BEGIN;
+#ifdef __NR_msgrcv
+ r = syscall(SYS_msgrcv, q, m, len, type, flag);
+#else
+ r = syscall(SYS_ipc, IPCOP_msgrcv, q, len, flag, ((long[]){ (long)m, type }));
+#endif
+ CANCELPT_END;
+ return r;
+}
generated by cgit v1.2.1 (git 2.18.0) at 2025年09月19日 19:16:39 +0000

AltStyle によって変換されたページ (->オリジナル) /