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 16:08 +0200, Eric Dumazet wrote:
> I dont understand why you make a get_task_struct() before the cmpxchg()
> and rollback. We certainly must hold a lock/mutex before calling
> wake_list_add()
>
> It could be :
>
> {
> if (cmpxchg(&n->next, NULL, head->first))
> return;
>
> get_task_struct(p);
> head->first = n;
> }

You're quite right. No idea why I wrote it like that..


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