Re: [tip:core/locking] locking, x86: Slightly shorten __ticket_spin_trylock()

From: Linus Torvalds
Date: Wed Dec 02 2009 - 12:06:21 EST




On Wed, 2 Dec 2009, Linus Torvalds wrote:
>
> So stop making excuses. Just admit that 'bool' was wrong, and you made a
> fundamental mistake in choosing it. The fact is, the compiler can do
> whatever the hell it does, which is not necessarily sensible with any
> other type. 'bool' really is special.

Btw, even if gcc just treats 'bool' as 'char' (which is the sane thing to
do on x86 anyway - I don't see why it should ever do anything else), we
actually mess up in the kernel and make that type confusion even worse.

Do this:

git grep typedef.*bool

and then do this:

git grep 'define bool'

and then sit down and cry silently.

Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/