Willy Tarreau wrote:
>Hi !
>
>Well, although I usually don't like these endless coding-style threads, why
>don't you simply use this common form ? :
>
> return !!(foo & MASK);
>
>I found that the compilers like it much and easily emit conditionnal set
>instructions. Eg, on x86, this should be something like :
>
> testl MASK, foo
> setnz retcode
>
>
>
>
>
That was the first thing I'd suggested.
Let's canonize (in the "add to the canon" sense) this. :)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Wed Apr 30 2003 - 22:00:17 EST