lkml.org 
[lkml]   [2011]   [Sep]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC][PATCH 1/3] sched: Provide delayed wakeup list
From
Date
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..


\
 
 \ /
  Last update: 2011-09-14 15:53    [W:0.133 / U:0.324 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site