aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sem.h
diff options
context:
space:
mode:
authorManfred Spraul <manfred@colorfullife.com>2008-07-25 04:48:04 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-25 13:53:42 -0400
commit4daa28f6d8f5cda8ea0f55048e3c8811c384cbdd (patch)
tree934bfbd7932a18da8295d9e21727985d1ea16311 /include/linux/sem.h
parent00c2bf85d8febfcfddde63822043462b026134ff (diff)
ipc/sem.c: convert undo structures to struct list_head
The undo structures contain two linked lists, the attached patch replaces them with generic struct list_head lists. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Manfred Spraul <manfred@colorfullife.com> Cc: Nadia Derbey <Nadia.Derbey@bull.net> Cc: Pierre Peiffer <peifferp@gmail.com> 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.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/include/linux/sem.h b/include/linux/sem.h
index c8eaad9e4b72..6a1af1b49a13 100644
--- a/include/linux/sem.h
+++ b/include/linux/sem.h
@@ -95,7 +95,7 @@ struct sem_array {
95 struct sem *sem_base; /* ptr to first semaphore in array */ 95 struct sem *sem_base; /* ptr to first semaphore in array */
96 struct sem_queue *sem_pending; /* pending operations to be processed */ 96 struct sem_queue *sem_pending; /* pending operations to be processed */
97 struct sem_queue **sem_pending_last; /* last pending operation */ 97 struct sem_queue **sem_pending_last; /* last pending operation */
98 struct sem_undo *undo; /* undo requests on this array */ 98 struct list_head list_id; /* undo requests on this array */
99 unsigned long sem_nsems; /* no. of semaphores in array */ 99 unsigned long sem_nsems; /* no. of semaphores in array */
100}; 100};
101 101
@@ -118,8 +118,8 @@ struct sem_queue {
118 * when the process exits. 118 * when the process exits.
119 */ 119 */
120struct sem_undo { 120struct sem_undo {
121 struct sem_undo * proc_next; /* next entry on this process */ 121 struct list_head list_proc; /* per-process list: all undos from one process */
122 struct sem_undo * id_next; /* next entry on this semaphore set */ 122 struct list_head list_id; /* per semaphore array list: all undos for one array */
123 int semid; /* semaphore set identifier */ 123 int semid; /* semaphore set identifier */
124 short * semadj; /* array of adjustments, one per semaphore */ 124 short * semadj; /* array of adjustments, one per semaphore */
125}; 125};
@@ -128,9 +128,9 @@ struct sem_undo {
128 * that may be shared among all a CLONE_SYSVSEM task group. 128 * that may be shared among all a CLONE_SYSVSEM task group.
129 */ 129 */
130struct sem_undo_list { 130struct sem_undo_list {
131 atomic_t refcnt; 131 atomic_t refcnt;
132 spinlock_t lock; 132 spinlock_t lock;
133 struct sem_undo *proc_list; 133 struct list_head list_proc;
134}; 134};
135 135
136struct sysv_sem { 136struct sysv_sem {