aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sem.h
diff options
context:
space:
mode:
authorManfred Spraul <manfred@colorfullife.com>2011-11-02 16:38:54 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-11-02 19:07:01 -0400
commite57940d719e9fc5223d133b631f8cb5232d6064e (patch)
treef4dfe100c571e245c7db90c446c548b9bf33b9e7 /include/linux/sem.h
parent0b0577f6080c0645b079dcc03fdbaf40d928beb8 (diff)
ipc/sem.c: remove private structures from public header file
include/linux/sem.h contains several structures that are only used within ipc/sem.c. The patch moves them into ipc/sem.c - there is no need to expose the structures to the whole kernel. No functional changes, only whitespace cleanups and 80-char per line fixes. Signed-off-by: Manfred Spraul <manfred@colorfullife.com> Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Mike Galbraith <efault@gmx.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/sem.h')
-rw-r--r--include/linux/sem.h42
1 files changed, 0 insertions, 42 deletions
diff --git a/include/linux/sem.h b/include/linux/sem.h
index 1feb2de2ee57..464842621a4a 100644
--- a/include/linux/sem.h
+++ b/include/linux/sem.h
@@ -83,13 +83,6 @@ struct seminfo {
83 83
84struct task_struct; 84struct task_struct;
85 85
86/* One semaphore structure for each semaphore in the system. */
87struct sem {
88 int semval; /* current value */
89 int sempid; /* pid of last operation */
90 struct list_head sem_pending; /* pending single-sop operations */
91};
92
93/* One sem_array data structure for each set of semaphores in the system. */ 86/* One sem_array data structure for each set of semaphores in the system. */
94struct sem_array { 87struct sem_array {
95 struct kern_ipc_perm ____cacheline_aligned_in_smp 88 struct kern_ipc_perm ____cacheline_aligned_in_smp
@@ -103,41 +96,6 @@ struct sem_array {
103 int complex_count; /* pending complex operations */ 96 int complex_count; /* pending complex operations */
104}; 97};
105 98
106/* One queue for each sleeping process in the system. */
107struct sem_queue {
108 struct list_head simple_list; /* queue of pending operations */
109 struct list_head list; /* queue of pending operations */
110 struct task_struct *sleeper; /* this process */
111 struct sem_undo *undo; /* undo structure */
112 int pid; /* process id of requesting process */
113 int status; /* completion status of operation */
114 struct sembuf *sops; /* array of pending operations */
115 int nsops; /* number of operations */
116 int alter; /* does the operation alter the array? */
117};
118
119/* Each task has a list of undo requests. They are executed automatically
120 * when the process exits.
121 */
122struct sem_undo {
123 struct list_head list_proc; /* per-process list: all undos from one process. */
124 /* rcu protected */
125 struct rcu_head rcu; /* rcu struct for sem_undo() */
126 struct sem_undo_list *ulp; /* sem_undo_list for the process */
127 struct list_head list_id; /* per semaphore array list: all undos for one array */
128 int semid; /* semaphore set identifier */
129 short * semadj; /* array of adjustments, one per semaphore */
130};
131
132/* sem_undo_list controls shared access to the list of sem_undo structures
133 * that may be shared among all a CLONE_SYSVSEM task group.
134 */
135struct sem_undo_list {
136 atomic_t refcnt;
137 spinlock_t lock;
138 struct list_head list_proc;
139};
140
141struct sysv_sem { 99struct sysv_sem {
142 struct sem_undo_list *undo_list; 100 struct sem_undo_list *undo_list;
143}; 101};