[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1345465141.5069.0.camel@gandalf.local.home>
Date: Mon, 20 Aug 2012 08:19:01 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Oleg Nesterov <oleg@...hat.com>, Dave Jones <davej@...hat.com>,
Linux Kernel <linux-kernel@...r.kernel.org>,
Thomas Gleixner <tglx@...utronix.de>,
dhowells <dhowells@...hat.com>, Al Viro <viro@...iv.linux.org.uk>
Subject: Re: lockdep trace from posix timers
On Mon, 2012-08-20 at 13:50 +0200, Peter Zijlstra wrote:
> On Mon, 2012-08-20 at 13:44 +0200, Peter Zijlstra wrote:
> > int
> > +task_work_add(struct task_struct *task, struct callback_head *work, bool notify)
> > {
> > + struct callback_head **head = &task->task_works;
> > + struct callback_head *entry, *old_entry;
> > +
> > + entry = &head;
>
> My compiler just alerted me that:
>
> entry = *head;
>
> works a lot better..
>
> > + for (;;) {
> > + if (entry == &dead)
But your compiler likes "entry == &dead"? ;-)
-- Steve
> > + return -ESRCH;
> > +
> > + old_entry = entry;
> > + work->next = entry;
> > + entry = cmpxchg(head, old_entry, work);
> > + if (entry == old_entry)
> > + break;
> > + }
> >
> > /* test_and_set_bit() implies mb(), see tracehook_notify_resume(). */
> > if (notify)
> > set_notify_resume(task);
> > +
> > return 0;
> > }
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists