From: Andrew Morton <akpm@osdl.org>
To: Ingo Molnar <mingo@elte.hu>
Cc: linux-kernel@vger.kernel.org, tglx@linutronix.de,
torvalds@osdl.org, arjan@infradead.org, simlo@phys.au.dk
Subject: Re: [patch] PI-futex: -V2
Date: Sun, 26 Mar 2006 11:16:45 -0800 [thread overview]
Message-ID: <20060326111645.3cf2c206.akpm@osdl.org> (raw)
In-Reply-To: <20060326160353.GA13282@elte.hu>
Ingo Molnar <mingo@elte.hu> wrote:
>
> > > + for (;;) {
> > > + if (top_waiter)
> > > + plist_del(&top_waiter->pi_list_entry,
> > > + &owner->pi_waiters);
> > > +
> > > + if (waiter && waiter == rt_mutex_top_waiter(lock)) {
> >
> > rt_mutex_top_waiter() can never return NULL, so the test for NULL
> > could be removed.
>
> it might be NULL if adjust_pi_chain() is called from remove_waiter(),
> and next_waiter there is NULL (because !rt_mutex_has_waiters() after the
> removal of the current waiter).
Yes, `waiter' might be NULL. But rt_mutex_top_waiter() will never return
NULL. So it might be possible to just do
if (waiter == rt_mutex_top_waiter(lock))
Which might actually be less efficient, and more obscure. Just pointing it
out.
next prev parent reply other threads:[~2006-03-26 19:20 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-25 18:46 [patch 05/10] PI-futex: rt-mutex core Ingo Molnar
2006-03-26 5:35 ` Andrew Morton
2006-03-26 23:33 ` Ingo Molnar
2006-03-26 6:07 ` Andrew Morton
2006-03-26 16:03 ` [patch] PI-futex: -V2 Ingo Molnar
2006-03-26 19:16 ` Andrew Morton [this message]
2006-03-26 23:30 ` Ingo Molnar
2006-03-26 23:16 ` [patch] PI-futex: -V3 Ingo Molnar
2006-03-28 10:17 ` [patch-mm2] PI-futex: fix timeout race Thomas Gleixner
2006-03-31 19:14 ` [patch] PI-futex patchset: -V4 Ingo Molnar
2006-03-31 19:23 ` Ingo Molnar
2006-04-01 0:19 ` Peter Williams
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060326111645.3cf2c206.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=arjan@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=simlo@phys.au.dk \
--cc=tglx@linutronix.de \
--cc=torvalds@osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®