shmbuf.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. #ifndef __ASM_GENERIC_SHMBUF_H
  2. #define __ASM_GENERIC_SHMBUF_H
  3. #include <asm/bitsperlong.h>
  4. /*
  5. * The shmid64_ds structure for x86 architecture.
  6. * Note extra padding because this structure is passed back and forth
  7. * between kernel and user space.
  8. *
  9. * shmid64_ds was originally meant to be architecture specific, but
  10. * everyone just ended up making identical copies without specific
  11. * optimizations, so we may just as well all use the same one.
  12. *
  13. * 64 bit architectures typically define a 64 bit __kernel_time_t,
  14. * so they do not need the first two padding words.
  15. * On big-endian systems, the padding is in the wrong place.
  16. *
  17. *
  18. * Pad space is left for:
  19. * - 64-bit time_t to solve y2038 problem
  20. * - 2 miscellaneous 32-bit values
  21. */
  22. struct shmid64_ds {
  23. struct ipc64_perm shm_perm; /* operation perms */
  24. size_t shm_segsz; /* size of segment (bytes) */
  25. __kernel_time_t shm_atime; /* last attach time */
  26. #if __BITS_PER_LONG != 64
  27. unsigned long __unused1;
  28. #endif
  29. __kernel_time_t shm_dtime; /* last detach time */
  30. #if __BITS_PER_LONG != 64
  31. unsigned long __unused2;
  32. #endif
  33. __kernel_time_t shm_ctime; /* last change time */
  34. #if __BITS_PER_LONG != 64
  35. unsigned long __unused3;
  36. #endif
  37. __kernel_pid_t shm_cpid; /* pid of creator */
  38. __kernel_pid_t shm_lpid; /* pid of last operator */
  39. __kernel_ulong_t shm_nattch; /* no. of current attaches */
  40. __kernel_ulong_t __unused4;
  41. __kernel_ulong_t __unused5;
  42. };
  43. struct shminfo64 {
  44. __kernel_ulong_t shmmax;
  45. __kernel_ulong_t shmmin;
  46. __kernel_ulong_t shmmni;
  47. __kernel_ulong_t shmseg;
  48. __kernel_ulong_t shmall;
  49. __kernel_ulong_t __unused1;
  50. __kernel_ulong_t __unused2;
  51. __kernel_ulong_t __unused3;
  52. __kernel_ulong_t __unused4;
  53. };
  54. #endif /* __ASM_GENERIC_SHMBUF_H */