aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sem.h
diff options
context:
space:
mode:
authorManfred Spraul <manfred@colorfullife.com>2008-07-25 04:48:06 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-25 13:53:42 -0400
commita1193f8ec091cd8fd309cc2982abe4499f6f2b4d (patch)
treeb12f2ed903fea86cfc1fd34ddb464ecfc59e5452 /include/linux/sem.h
parent2c0c29d414087f3b021059673c20a7088f5f1fff (diff)
ipc/sem.c: convert sem_array.sem_pending to struct list_head
sem_array.sem_pending is a double linked list, the attached patch converts it to struct list_head. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Manfred Spraul <manfred@colorfullife.com> Reviewed-by: 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, 5 insertions, 7 deletions
diff --git a/include/linux/sem.h b/include/linux/sem.h
index 87756ef1198e..d42599395d79 100644
--- a/include/linux/sem.h
+++ b/include/linux/sem.h
@@ -93,21 +93,19 @@ struct sem_array {
93 time_t sem_otime; /* last semop time */ 93 time_t sem_otime; /* last semop time */
94 time_t sem_ctime; /* last change time */ 94 time_t sem_ctime; /* last change time */
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 list_head sem_pending; /* pending operations to be processed */
97 struct sem_queue **sem_pending_last; /* last pending operation */
98 struct list_head list_id; /* undo requests on this array */ 97 struct list_head list_id; /* undo requests on this array */
99 unsigned long sem_nsems; /* no. of semaphores in array */ 98 unsigned long sem_nsems; /* no. of semaphores in array */
100}; 99};
101 100
102/* One queue for each sleeping process in the system. */ 101/* One queue for each sleeping process in the system. */
103struct sem_queue { 102struct sem_queue {
104 struct sem_queue * next; /* next entry in the queue */ 103 struct list_head list; /* queue of pending operations */
105 struct sem_queue ** prev; /* previous entry in the queue, *(q->prev) == q */ 104 struct task_struct *sleeper; /* this process */
106 struct task_struct* sleeper; /* this process */ 105 struct sem_undo *undo; /* undo structure */
107 struct sem_undo * undo; /* undo structure */
108 int pid; /* process id of requesting process */ 106 int pid; /* process id of requesting process */
109 int status; /* completion status of operation */ 107 int status; /* completion status of operation */
110 struct sembuf * sops; /* array of pending operations */ 108 struct sembuf *sops; /* array of pending operations */
111 int nsops; /* number of operations */ 109 int nsops; /* number of operations */
112 int alter; /* does the operation alter the array? */ 110 int alter; /* does the operation alter the array? */
113}; 111};