sem: Split out sem_types.h
authorKent Overstreet <kent.overstreet@linux.dev>
Mon, 11 Dec 2023 20:52:17 +0000 (15:52 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Thu, 21 Dec 2023 00:26:32 +0000 (19:26 -0500)
More sched.h dependency pruning.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
include/linux/audit.h
include/linux/sched.h
include/linux/sem.h
include/linux/sem_types.h [new file with mode: 0644]

index 51b1b7054a233a167fa29a6461cce4bc5202a75e..0050ef288ab3cef002a4aaf02c8fe6cf039ed67d 100644 (file)
@@ -36,6 +36,7 @@ struct mqstat;
 struct audit_watch;
 struct audit_tree;
 struct sk_buff;
+struct kern_ipc_perm;
 
 struct audit_krule {
        u32                     pflags;
index 10e25c7fc793601e1294aa3740477c35cd6e5ee1..d341a6c302d6534090aa48378142b31d780846ad 100644 (file)
 
 #include <asm/current.h>
 
+#include <linux/cache.h>
 #include <linux/irqflags_types.h>
 #include <linux/pid_types.h>
-#include <linux/sem.h>
+#include <linux/sem_types.h>
 #include <linux/shm.h>
 #include <linux/kmsan_types.h>
 #include <linux/mutex_types.h>
 #include <linux/plist_types.h>
 #include <linux/hrtimer_types.h>
+#include <linux/timer_types.h>
 #include <linux/seccomp_types.h>
 #include <linux/nodemask_types.h>
 #include <linux/rcupdate.h>
index 5608a500c43ea9090835d0bee34b1dbb548444f3..c4deefe42aeb3ceca7f739298b460f668f5b3515 100644 (file)
@@ -3,25 +3,17 @@
 #define _LINUX_SEM_H
 
 #include <uapi/linux/sem.h>
+#include <linux/sem_types.h>
 
 struct task_struct;
-struct sem_undo_list;
 
 #ifdef CONFIG_SYSVIPC
 
-struct sysv_sem {
-       struct sem_undo_list *undo_list;
-};
-
 extern int copy_semundo(unsigned long clone_flags, struct task_struct *tsk);
 extern void exit_sem(struct task_struct *tsk);
 
 #else
 
-struct sysv_sem {
-       /* empty */
-};
-
 static inline int copy_semundo(unsigned long clone_flags, struct task_struct *tsk)
 {
        return 0;
diff --git a/include/linux/sem_types.h b/include/linux/sem_types.h
new file mode 100644 (file)
index 0000000..73df197
--- /dev/null
@@ -0,0 +1,13 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef _LINUX_SEM_TYPES_H
+#define _LINUX_SEM_TYPES_H
+
+struct sem_undo_list;
+
+struct sysv_sem {
+#ifdef CONFIG_SYSVIPC
+       struct sem_undo_list *undo_list;
+#endif
+};
+
+#endif /* _LINUX_SEM_TYPES_H */