Re: [PATCH 11/12] Generic semaphore implementation

Matthew Wilcox
2008-03-03T14:54:44Z

On Thu, Feb 28, 2008 at 06:37:59PM -0800, Harvey Harrison wrote:
> > +/*
> > + * Because this function is inlined, the 'state' parameter will be constant,
> > + * and thus optimised away by the compiler.
> > + */
>
> If so, is unlikely() still needed?

It's needed for the case where the function is inlined into
__down_interruptible / __down_killable.

> Other than that small bit, looks great, any thoughts to getting rid of
> all the likely/unlikely as well? If they're no longer performance
> critical, it would be nice to have it that little bit cleaner.

I'd rather keep it as close to mutex.c as possible.

--
Intel are signing my paycheques ... these opinions are still mine
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours. We can't possibly take such
a retrograde step."