Ok, I just updated to the current CVS head to check what's up and keep the
kernel in sync, and I have to say that that kernel stuff is getting uglier
and uglier. That macro abuse is getting quite _incredibly_ horrible.
For example, the "irqreturn_t" differences between Linux 2.4 and 2.6 were
very much designed to be pretty, but the DRI kernel code obviously never
saw that discussion, so it ended up doing more of those horribly ugly C
preprocessor things.
So the _nice_ way to handling "irqreturn_t" is to simply do something like
this:
/* backwards compatibility with old irq return values */
#ifndef IRQ_HANDLED
typedef void irqreturn_t;
#define IRQ_HANDLED /* nothing */
#define IRQ_NONE /* nothing */
#endif
in _one_ common header file, and after that you can write code as if
everything was 2.6.x - it will automatically be backwards compatible with
old kernels (and it will not need any kernel version tests, so if the irq
sanity stuff is ever backported, it will automatically do the right
thing).
And the code will be prettier, and a lot more readable too, since it now
uses the generic types and macros instead of having its own DRI-specific
stuff.
Please?
Linus
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel