Constant byteorder macros.
David Woodhouse
dwmw2 en infradead.org
Jue Ene 20 21:26:40 CST 2000
hpa en transmeta.com said:
> Given that gcc has a __builtin_constant_p(x), you ought to be able to
> do:
> #define cpu_to_le16(x) ( __builtin_constant_p(x) ? \
> __constant_cpu_to_le16(x) : __cpu_to_le16(x) )
I didn't really explore this avenue very deeply - I assumed that because it's
been done with a separate __constant_x macro in the htonl() case, there was a
problem with doing it in the way you suggest.
--
dwmw2
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo en vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/
Más información sobre la lista de distribución Ayuda