shm.h 910 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. #ifndef _SYS_SHM_H
  2. #define _SYS_SHM_H
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. #include <features.h>
  7. #define __NEED_time_t
  8. #define __NEED_size_t
  9. #define __NEED_pid_t
  10. #include <bits/alltypes.h>
  11. #include <sys/ipc.h>
  12. #ifdef _GNU_SOURCE
  13. #define __used_ids used_ids
  14. #define __swap_attempts swap_attempts
  15. #define __swap_successes swap_successes
  16. #endif
  17. #include <bits/shm.h>
  18. #define SHM_R 0400
  19. #define SHM_W 0200
  20. #define SHM_RDONLY 010000
  21. #define SHM_RND 020000
  22. #define SHM_REMAP 040000
  23. #define SHM_EXEC 0100000
  24. #define SHM_LOCK 11
  25. #define SHM_UNLOCK 12
  26. #define SHM_STAT 13
  27. #define SHM_INFO 14
  28. #define SHM_DEST 01000
  29. #define SHM_LOCKED 02000
  30. #define SHM_HUGETLB 04000
  31. #define SHM_NORESERVE 010000
  32. typedef unsigned long shmatt_t;
  33. void *shmat(int, const void *, int);
  34. int shmctl(int, int, struct shmid_ds *);
  35. int shmdt(const void *);
  36. int shmget(key_t, size_t, int);
  37. #ifdef __cplusplus
  38. }
  39. #endif
  40. #endif