Ingo Molnar <[email protected]> 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.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]