|
@@ -127,12 +127,26 @@ static inline void __add_wait_queue(wait_queue_head_t *head, wait_queue_t *new)
|
|
/*
|
|
/*
|
|
* Used for wake-one threads:
|
|
* Used for wake-one threads:
|
|
*/
|
|
*/
|
|
|
|
+static inline void __add_wait_queue_exclusive(wait_queue_head_t *q,
|
|
|
|
+ wait_queue_t *wait)
|
|
|
|
+{
|
|
|
|
+ wait->flags |= WQ_FLAG_EXCLUSIVE;
|
|
|
|
+ __add_wait_queue(q, wait);
|
|
|
|
+}
|
|
|
|
+
|
|
static inline void __add_wait_queue_tail(wait_queue_head_t *head,
|
|
static inline void __add_wait_queue_tail(wait_queue_head_t *head,
|
|
- wait_queue_t *new)
|
|
|
|
|
|
+ wait_queue_t *new)
|
|
{
|
|
{
|
|
list_add_tail(&new->task_list, &head->task_list);
|
|
list_add_tail(&new->task_list, &head->task_list);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+static inline void __add_wait_queue_tail_exclusive(wait_queue_head_t *q,
|
|
|
|
+ wait_queue_t *wait)
|
|
|
|
+{
|
|
|
|
+ wait->flags |= WQ_FLAG_EXCLUSIVE;
|
|
|
|
+ __add_wait_queue_tail(q, wait);
|
|
|
|
+}
|
|
|
|
+
|
|
static inline void __remove_wait_queue(wait_queue_head_t *head,
|
|
static inline void __remove_wait_queue(wait_queue_head_t *head,
|
|
wait_queue_t *old)
|
|
wait_queue_t *old)
|
|
{
|
|
{
|
|
@@ -403,25 +417,6 @@ do { \
|
|
__ret; \
|
|
__ret; \
|
|
})
|
|
})
|
|
|
|
|
|
-/*
|
|
|
|
- * Must be called with the spinlock in the wait_queue_head_t held.
|
|
|
|
- */
|
|
|
|
-static inline void add_wait_queue_exclusive_locked(wait_queue_head_t *q,
|
|
|
|
- wait_queue_t * wait)
|
|
|
|
-{
|
|
|
|
- wait->flags |= WQ_FLAG_EXCLUSIVE;
|
|
|
|
- __add_wait_queue_tail(q, wait);
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-/*
|
|
|
|
- * Must be called with the spinlock in the wait_queue_head_t held.
|
|
|
|
- */
|
|
|
|
-static inline void remove_wait_queue_locked(wait_queue_head_t *q,
|
|
|
|
- wait_queue_t * wait)
|
|
|
|
-{
|
|
|
|
- __remove_wait_queue(q, wait);
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
/*
|
|
/*
|
|
* These are the old interfaces to sleep waiting for an event.
|
|
* These are the old interfaces to sleep waiting for an event.
|
|
* They are racy. DO NOT use them, use the wait_event* interfaces above.
|
|
* They are racy. DO NOT use them, use the wait_event* interfaces above.
|