/* Wake up a process waiting on the sem queue with a given error. The queue is invalid (may not be accessed) after the function returns.  */
static void wake_up_sem_queue(struct sem_queue *q, int error)
/* Wake up a process waiting on the sem queue with a given error. The queue is invalid (may not be accessed) after the function returns.  */
static void wake_up_sem_queue(struct sem_queue *q, int error)
{
	preempt_disable();
	q->status = IN_WAKEUP;
	wake_up_process(q->sleeper);
	smp_wmb();
	q->status = error;
	preempt_enable();
}