/* 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 complete(struct completion *x)
/* 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 complete(struct completion *x)
{
	unsigned long flags;
	spin_lock_irqsave(&x->wait.lock, flags);
	x->done++;
	__wake_up_common(&x->wait, TASK_NORMAL, 1, 0, NULL);
	spin_unlock_irqrestore(&x->wait.lock, flags);
}