Skip to content

Commit e034d49

Browse files
author
Kent Overstreet
committed
sem: Split out sem_types.h
More sched.h dependency pruning. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
1 parent af6da56 commit e034d49

File tree

4 files changed

+18
-10
lines changed

4 files changed

+18
-10
lines changed

include/linux/audit.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ struct mqstat;
3636
struct audit_watch;
3737
struct audit_tree;
3838
struct sk_buff;
39+
struct kern_ipc_perm;
3940

4041
struct audit_krule {
4142
u32 pflags;

include/linux/sched.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,16 @@
1111

1212
#include <asm/current.h>
1313

14+
#include <linux/cache.h>
1415
#include <linux/irqflags_types.h>
1516
#include <linux/pid_types.h>
16-
#include <linux/sem.h>
17+
#include <linux/sem_types.h>
1718
#include <linux/shm.h>
1819
#include <linux/kmsan_types.h>
1920
#include <linux/mutex_types.h>
2021
#include <linux/plist_types.h>
2122
#include <linux/hrtimer_types.h>
23+
#include <linux/timer_types.h>
2224
#include <linux/seccomp_types.h>
2325
#include <linux/nodemask_types.h>
2426
#include <linux/rcupdate.h>

include/linux/sem.h

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,17 @@
33
#define _LINUX_SEM_H
44

55
#include <uapi/linux/sem.h>
6+
#include <linux/sem_types.h>
67

78
struct task_struct;
8-
struct sem_undo_list;
99

1010
#ifdef CONFIG_SYSVIPC
1111

12-
struct sysv_sem {
13-
struct sem_undo_list *undo_list;
14-
};
15-
1612
extern int copy_semundo(unsigned long clone_flags, struct task_struct *tsk);
1713
extern void exit_sem(struct task_struct *tsk);
1814

1915
#else
2016

21-
struct sysv_sem {
22-
/* empty */
23-
};
24-
2517
static inline int copy_semundo(unsigned long clone_flags, struct task_struct *tsk)
2618
{
2719
return 0;

include/linux/sem_types.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/* SPDX-License-Identifier: GPL-2.0 */
2+
#ifndef _LINUX_SEM_TYPES_H
3+
#define _LINUX_SEM_TYPES_H
4+
5+
struct sem_undo_list;
6+
7+
struct sysv_sem {
8+
#ifdef CONFIG_SYSVIPC
9+
struct sem_undo_list *undo_list;
10+
#endif
11+
};
12+
13+
#endif /* _LINUX_SEM_TYPES_H */

0 commit comments

Comments
 (0)