sembuf.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. #ifndef __ASM_GENERIC_SEMBUF_H
  2. #define __ASM_GENERIC_SEMBUF_H
  3. #include <asm/bitsperlong.h>
  4. /*
  5. * The semid64_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. * semid64_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. * Pad space is left for:
  18. * - 64-bit time_t to solve y2038 problem
  19. * - 2 miscellaneous 32-bit values
  20. */
  21. struct semid64_ds {
  22. struct ipc64_perm sem_perm; /* permissions .. see ipc.h */
  23. __kernel_time_t sem_otime; /* last semop time */
  24. #if __BITS_PER_LONG != 64
  25. unsigned long __unused1;
  26. #endif
  27. __kernel_time_t sem_ctime; /* last change time */
  28. #if __BITS_PER_LONG != 64
  29. unsigned long __unused2;
  30. #endif
  31. unsigned long sem_nsems; /* no. of semaphores in array */
  32. unsigned long __unused3;
  33. unsigned long __unused4;
  34. };
  35. #endif /* __ASM_GENERIC_SEMBUF_H */