Re: [RFC][PATCH 1/3] sched: Provide delayed wakeup list

From: Peter Zijlstra
Date: Wed Sep 14 2011 - 09:50:42 EST


On Wed, 2011-09-14 at 15:30 +0200, Peter Zijlstra wrote:
> + if (cmpxchg(&n->next, 0, n) != 0) {
> + /* It was already queued, drop the extra ref and we're done. */
> + put_task_struct(p);
> + return;
> + }
> +
> + /*
> + * The head is context local, there can be no concurrency.
> + */
> + n->next = head->first;

That could of course be folded into one op..
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/