Rich Felker | 8bb82b4 | 2011-04-05 16:33:55 -0400 | [diff] [blame] | 1 | #include <sys/msg.h> |
| 2 | #include "syscall.h" |
| 3 | #include "ipc.h" |
| 4 | #include "libc.h" |
| 5 | |
| 6 | ssize_t msgrcv(int q, void *m, size_t len, long type, int flag) |
| 7 | { |
Rich Felker | c2cd25b | 2011-04-06 20:32:53 -0400 | [diff] [blame] | 8 | #ifdef SYS_msgrcv |
Rich Felker | feee989 | 2011-04-17 11:43:03 -0400 | [diff] [blame] | 9 | return syscall_cp(SYS_msgrcv, q, m, len, type, flag); |
Rich Felker | 8bb82b4 | 2011-04-05 16:33:55 -0400 | [diff] [blame] | 10 | #else |
Rich Felker | feee989 | 2011-04-17 11:43:03 -0400 | [diff] [blame] | 11 | return syscall_cp(SYS_ipc, IPCOP_msgrcv, q, len, flag, ((long[]){ (long)m, type })); |
Rich Felker | 8bb82b4 | 2011-04-05 16:33:55 -0400 | [diff] [blame] | 12 | #endif |
Rich Felker | 8bb82b4 | 2011-04-05 16:33:55 -0400 | [diff] [blame] | 13 | } |