diff options
author | Manfred Spraul <manfred@colorfullife.com> | 2013-07-08 19:01:23 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-09 13:33:28 -0400 |
commit | 1a82e9e1d0f1b45f47a97c9e2349020536ff8987 (patch) | |
tree | 956810c32e02f6ae1527db015c6ae622800bd720 /include/linux/sem.h | |
parent | f5c936c0f267ec58641451cf8b8d39b4c207ee4d (diff) |
ipc/sem: separate wait-for-zero and alter tasks into seperate queues
Introduce separate queues for operations that do not modify the
semaphore values. Advantages:
- Simpler logic in check_restart().
- Faster update_queue(): Right now, all wait-for-zero operations are
always tested, even if the semaphore value is not 0.
- wait-for-zero gets again priority, as in linux <=3.0.9
Signed-off-by: Manfred Spraul <manfred@colorfullife.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Davidlohr Bueso <davidlohr.bueso@hp.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.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/sem.h b/include/linux/sem.h index 53d42650b193..55e17f68d256 100644 --- a/include/linux/sem.h +++ b/include/linux/sem.h | |||
@@ -15,7 +15,10 @@ struct sem_array { | |||
15 | time_t sem_otime; /* last semop time */ | 15 | time_t sem_otime; /* last semop time */ |
16 | time_t sem_ctime; /* last change time */ | 16 | time_t sem_ctime; /* last change time */ |
17 | struct sem *sem_base; /* ptr to first semaphore in array */ | 17 | struct sem *sem_base; /* ptr to first semaphore in array */ |
18 | struct list_head sem_pending; /* pending operations to be processed */ | 18 | struct list_head pending_alter; /* pending operations */ |
19 | /* that alter the array */ | ||
20 | struct list_head pending_const; /* pending complex operations */ | ||
21 | /* that do not alter semvals */ | ||
19 | struct list_head list_id; /* undo requests on this array */ | 22 | struct list_head list_id; /* undo requests on this array */ |
20 | int sem_nsems; /* no. of semaphores in array */ | 23 | int sem_nsems; /* no. of semaphores in array */ |
21 | int complex_count; /* pending complex operations */ | 24 | int complex_count; /* pending complex operations */ |