void fastcall __wake_up_sync(wait_queue_head_t *q, unsigned int mode, int nr_exclusive)
{
unsigned long flags;
+ int sync = 1;
if (unlikely(!q))
return;
+ if (unlikely(!nr_exclusive))
+ sync = 0;
+
spin_lock_irqsave(&q->lock, flags);
- if (likely(nr_exclusive))
- __wake_up_common(q, mode, nr_exclusive, 1);
- else
- __wake_up_common(q, mode, nr_exclusive, 0);
+ __wake_up_common(q, mode, nr_exclusive, sync);
spin_unlock_irqrestore(&q->lock, flags);
}
EXPORT_SYMBOL_GPL(__wake_up_sync); /* For internal use only */