sem.h 599 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef _LINUX_SEM_H
  3. #define _LINUX_SEM_H
  4. #include <uapi/linux/sem.h>
  5. struct task_struct;
  6. struct sem_undo_list;
  7. #ifdef CONFIG_SYSVIPC
  8. struct sysv_sem {
  9. struct sem_undo_list *undo_list;
  10. };
  11. extern int copy_semundo(unsigned long clone_flags, struct task_struct *tsk);
  12. extern void exit_sem(struct task_struct *tsk);
  13. #else
  14. struct sysv_sem {
  15. /* empty */
  16. };
  17. static inline int copy_semundo(unsigned long clone_flags, struct task_struct *tsk)
  18. {
  19. return 0;
  20. }
  21. static inline void exit_sem(struct task_struct *tsk)
  22. {
  23. return;
  24. }
  25. #endif
  26. #endif /* _LINUX_SEM_H */