Date: Tue, 24 Oct 2000 16:30:26 -0700 (PDT) From: Jeff Foster <jfoster@EECS.Berkeley.EDU> Subject: kernel compiler hack Message-ID: <Pine.LNX.4.21.0010241629380.16391-100000@lagaffe.cs.berkeley.edu> Here's the hack I mentioned at the meeting today. Jeff 8. Nonexistent Functions In The Kernel - And Staying 10 Oct - 11 Oct (14 posts): __bad_udelay in 2.2.18pre15 Marcelo Tosatti [*] noticed that '__bad_udelay()' was used in 'udelay()' for handling large values, but wasn't defined anywhere in the sources. Horst von Brand [*] explained, "That is precisely the idea: Flag the places where udelay() is called with a large constant value. Just won't find out uses with large _variable_ arguments, but it is a start. Netted one in PCMCIA-CS..." Alan Cox [*] added succinctly, "Its a compile time error trap." Chris Swiedler [*] suggested, "Wouldn't it be better to use an #error directive? I'm sure this could turn into a FAQ, even though the symbol is called "__bad_udelay()"." Alan and Andreas Schwab [*] pointed out that the test couldn't be done in the pre-processor, where #error would be handled, but had to be done in the compiler itself. >From http://kt.linuxcare.com/kernel-traffic/kt20001023_90.epl
This archive was generated by hypermail 2b30 : 11/04/02 PST