aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/wait.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/wait.h')
-rw-r--r--include/linux/wait.h35
1 files changed, 15 insertions, 20 deletions
diff --git a/include/linux/wait.h b/include/linux/wait.h
index fc3c040e5e3a..0836ccc57121 100644
--- a/include/linux/wait.h
+++ b/include/linux/wait.h
@@ -127,12 +127,26 @@ static inline void __add_wait_queue(wait_queue_head_t *head, wait_queue_t *new)
127/* 127/*
128 * Used for wake-one threads: 128 * Used for wake-one threads:
129 */ 129 */
130static inline void __add_wait_queue_exclusive(wait_queue_head_t *q,
131 wait_queue_t *wait)
132{
133 wait->flags |= WQ_FLAG_EXCLUSIVE;
134 __add_wait_queue(q, wait);
135}
136
130static inline void __add_wait_queue_tail(wait_queue_head_t *head, 137static inline void __add_wait_queue_tail(wait_queue_head_t *head,
131 wait_queue_t *new) 138 wait_queue_t *new)
132{ 139{
133 list_add_tail(&new->task_list, &head->task_list); 140 list_add_tail(&new->task_list, &head->task_list);
134} 141}
135 142
143static inline void __add_wait_queue_tail_exclusive(wait_queue_head_t *q,
144 wait_queue_t *wait)
145{
146 wait->flags |= WQ_FLAG_EXCLUSIVE;
147 __add_wait_queue_tail(q, wait);
148}
149
136static inline void __remove_wait_queue(wait_queue_head_t *head, 150static inline void __remove_wait_queue(wait_queue_head_t *head,
137 wait_queue_t *old) 151 wait_queue_t *old)
138{ 152{
@@ -553,25 +567,6 @@ do { \
553}) 567})
554 568
555/* 569/*
556 * Must be called with the spinlock in the wait_queue_head_t held.
557 */
558static inline void add_wait_queue_exclusive_locked(wait_queue_head_t *q,
559 wait_queue_t * wait)
560{
561 wait->flags |= WQ_FLAG_EXCLUSIVE;
562 __add_wait_queue_tail(q, wait);
563}
564
565/*
566 * Must be called with the spinlock in the wait_queue_head_t held.
567 */
568static inline void remove_wait_queue_locked(wait_queue_head_t *q,
569 wait_queue_t * wait)
570{
571 __remove_wait_queue(q, wait);
572}
573
574/*
575 * These are the old interfaces to sleep waiting for an event. 570 * These are the old interfaces to sleep waiting for an event.
576 * They are racy. DO NOT use them, use the wait_event* interfaces above. 571 * They are racy. DO NOT use them, use the wait_event* interfaces above.
577 * We plan to remove these interfaces. 572 * We plan to remove these interfaces.