ipc.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #ifndef IPC_H
  2. #define IPC_H
  3. #include <syscall.h>
  4. #include <bits/kernel-features.h>
  5. #include <bits/wordsize.h>
  6. #ifndef __ARCH_HAS_DEPRECATED_SYSCALLS__
  7. # define __IPC_64 0x0
  8. #elif defined __mips__ || defined __m68k__
  9. # if __LINUX_KERNEL_VERSION < 0x050100
  10. # define __IPC_64 0x100
  11. # else
  12. # define __IPC_64 0x0
  13. # endif
  14. #else
  15. # if __WORDSIZE == 32 || defined __alpha__
  16. # define __IPC_64 0x100
  17. # else
  18. # define __IPC_64 0x0
  19. # endif
  20. #endif
  21. #ifdef __NR_ipc
  22. /* The actual system call: all functions are multiplexed by this. */
  23. extern int __syscall_ipc (unsigned int __call, long __first, long __second,
  24. long __third, void *__ptr, void *__fifth) attribute_hidden;
  25. /* The codes for the functions to use the multiplexer `__syscall_ipc'. */
  26. #define IPCOP_semop 1
  27. #define IPCOP_semget 2
  28. #define IPCOP_semctl 3
  29. #define IPCOP_semtimedop 4
  30. #define IPCOP_msgsnd 11
  31. #define IPCOP_msgrcv 12
  32. #define IPCOP_msgget 13
  33. #define IPCOP_msgctl 14
  34. #define IPCOP_shmat 21
  35. #define IPCOP_shmdt 22
  36. #define IPCOP_shmget 23
  37. #define IPCOP_shmctl 24
  38. #endif
  39. #endif /* IPC_H */