/* It may be assumed that this function implies a write memory barrier before changing the task state if and only if any tasks are woken up.  */
void __wake_up_sync_key(wait_queue_head_t *q, unsigned int mode, int nr_exclusive, void *key)
/* It may be assumed that this function implies a write memory barrier before changing the task state if and only if any tasks are woken up.  */
void __wake_up_sync_key(wait_queue_head_t *q, unsigned int mode, int nr_exclusive, void *key)
{
	unsigned long flags;
	int wake_flags = WF_SYNC;
	if (unlikely(!q))
		return;
	if (unlikely(!nr_exclusive))
		wake_flags = 0;
	spin_lock_irqsave(&q->lock, flags);
	__wake_up_common(q, mode, nr_exclusive, wake_flags, key);
	spin_unlock_irqrestore(&q->lock, flags);
}