shmbuf.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
  2. #ifndef _ASM_SHMBUF_H
  3. #define _ASM_SHMBUF_H
  4. #include <asm/ipcbuf.h>
  5. #include <asm/posix_types.h>
  6. /*
  7. * The shmid64_ds structure for the MIPS architecture.
  8. * Note extra padding because this structure is passed back and forth
  9. * between kernel and user space.
  10. *
  11. * As MIPS was lacking proper padding after shm_?time, we use 48 bits
  12. * of the padding at the end to store a few additional bits of the time.
  13. * libc implementations need to take care to convert this into a proper
  14. * data structure when moving to 64-bit time_t.
  15. */
  16. #ifdef __mips64
  17. struct shmid64_ds {
  18. struct ipc64_perm shm_perm; /* operation perms */
  19. __kernel_size_t shm_segsz; /* size of segment (bytes) */
  20. long shm_atime; /* last attach time */
  21. long shm_dtime; /* last detach time */
  22. long shm_ctime; /* last change time */
  23. __kernel_pid_t shm_cpid; /* pid of creator */
  24. __kernel_pid_t shm_lpid; /* pid of last operator */
  25. unsigned long shm_nattch; /* no. of current attaches */
  26. unsigned long __unused1;
  27. unsigned long __unused2;
  28. };
  29. #else
  30. struct shmid64_ds {
  31. struct ipc64_perm shm_perm; /* operation perms */
  32. __kernel_size_t shm_segsz; /* size of segment (bytes) */
  33. unsigned long shm_atime; /* last attach time */
  34. unsigned long shm_dtime; /* last detach time */
  35. unsigned long shm_ctime; /* last change time */
  36. __kernel_pid_t shm_cpid; /* pid of creator */
  37. __kernel_pid_t shm_lpid; /* pid of last operator */
  38. unsigned long shm_nattch; /* no. of current attaches */
  39. unsigned short shm_atime_high;
  40. unsigned short shm_dtime_high;
  41. unsigned short shm_ctime_high;
  42. unsigned short __unused1;
  43. };
  44. #endif
  45. struct shminfo64 {
  46. unsigned long shmmax;
  47. unsigned long shmmin;
  48. unsigned long shmmni;
  49. unsigned long shmseg;
  50. unsigned long shmall;
  51. unsigned long __unused1;
  52. unsigned long __unused2;
  53. unsigned long __unused3;
  54. unsigned long __unused4;
  55. };
  56. #endif /* _ASM_SHMBUF_H */