diff options
| author | Robert Love <rml@tech9.net> | 2002-06-02 20:55:19 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2002-06-02 20:55:19 -0700 |
| commit | f0245aacdf050a70345797eb7e8da74a9c16b3dc (patch) | |
| tree | 3804cee2d7b3a9ebcb3260a05d45805a3d4a730f /include | |
| parent | 7723316a83dd8076af3d3b4222d972f295a9218f (diff) | |
[PATCH] remove wq_lock_t cruft
This patch removes the whole wq_lock_t abstraction, forcing the behavior
to be that of a standard spinlock and changes all the wq_lock code in
the tree appropriately.
Removes lots of code - always a Good Thing to me. New behavior is same
as previous behavior (USE_RW_WAIT_QUEUE_SPINLOCK unset).
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/wait.h | 40 |
1 files changed, 3 insertions, 37 deletions
diff --git a/include/linux/wait.h b/include/linux/wait.h index 186f03f015f7..cc32e6b1c4f7 100644 --- a/include/linux/wait.h +++ b/include/linux/wait.h @@ -27,42 +27,8 @@ struct __wait_queue { }; typedef struct __wait_queue wait_queue_t; -/* - * 'dual' spinlock architecture. Can be switched between spinlock_t and - * rwlock_t locks via changing this define. Since waitqueues are quite - * decoupled in the new architecture, lightweight 'simple' spinlocks give - * us slightly better latencies and smaller waitqueue structure size. - */ -#define USE_RW_WAIT_QUEUE_SPINLOCK 0 - -#if USE_RW_WAIT_QUEUE_SPINLOCK -# define wq_lock_t rwlock_t -# define WAITQUEUE_RW_LOCK_UNLOCKED RW_LOCK_UNLOCKED - -# define wq_read_lock read_lock -# define wq_read_lock_irqsave read_lock_irqsave -# define wq_read_unlock_irqrestore read_unlock_irqrestore -# define wq_read_unlock read_unlock -# define wq_write_lock_irq write_lock_irq -# define wq_write_lock_irqsave write_lock_irqsave -# define wq_write_unlock_irqrestore write_unlock_irqrestore -# define wq_write_unlock write_unlock -#else -# define wq_lock_t spinlock_t -# define WAITQUEUE_RW_LOCK_UNLOCKED SPIN_LOCK_UNLOCKED - -# define wq_read_lock spin_lock -# define wq_read_lock_irqsave spin_lock_irqsave -# define wq_read_unlock spin_unlock -# define wq_read_unlock_irqrestore spin_unlock_irqrestore -# define wq_write_lock_irq spin_lock_irq -# define wq_write_lock_irqsave spin_lock_irqsave -# define wq_write_unlock_irqrestore spin_unlock_irqrestore -# define wq_write_unlock spin_unlock -#endif - struct __wait_queue_head { - wq_lock_t lock; + spinlock_t lock; struct list_head task_list; }; typedef struct __wait_queue_head wait_queue_head_t; @@ -80,7 +46,7 @@ typedef struct __wait_queue_head wait_queue_head_t; wait_queue_t name = __WAITQUEUE_INITIALIZER(name, tsk) #define __WAIT_QUEUE_HEAD_INITIALIZER(name) { \ - lock: WAITQUEUE_RW_LOCK_UNLOCKED, \ + lock: SPIN_LOCK_UNLOCKED, \ task_list: { &(name).task_list, &(name).task_list } } #define DECLARE_WAIT_QUEUE_HEAD(name) \ @@ -88,7 +54,7 @@ typedef struct __wait_queue_head wait_queue_head_t; static inline void init_waitqueue_head(wait_queue_head_t *q) { - q->lock = WAITQUEUE_RW_LOCK_UNLOCKED; + q->lock = SPIN_LOCK_UNLOCKED; INIT_LIST_HEAD(&q->task_list); } |
