diff options
Diffstat (limited to 'include/linux')
| -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); } |
