Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #ifndef _LINUX_SEM_H
0003 #define _LINUX_SEM_H
0004 
0005 #include <uapi/linux/sem.h>
0006 
0007 struct task_struct;
0008 struct sem_undo_list;
0009 
0010 #ifdef CONFIG_SYSVIPC
0011 
0012 struct sysv_sem {
0013     struct sem_undo_list *undo_list;
0014 };
0015 
0016 extern int copy_semundo(unsigned long clone_flags, struct task_struct *tsk);
0017 extern void exit_sem(struct task_struct *tsk);
0018 
0019 #else
0020 
0021 struct sysv_sem {
0022     /* empty */
0023 };
0024 
0025 static inline int copy_semundo(unsigned long clone_flags, struct task_struct *tsk)
0026 {
0027     return 0;
0028 }
0029 
0030 static inline void exit_sem(struct task_struct *tsk)
0031 {
0032     return;
0033 }
0034 #endif
0035 
0036 #endif /* _LINUX_SEM_H */