Linux-kernel mailing list archive 2000-47,: Re: linux-2.2.18-pre19 asm/delay.h problem?

# Re: linux-2.2.18-pre19 asm/delay.h problem?

Rogier Wolff (R.E.Wolff@BitWizard.nl)
Wed, 22 Nov 2000 10:57:53 +0100 (MET)

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: David S. Miller: "Re: [BUG] 2.2.1[78] : RTNETLINK lock not properly locking ?"
- Previous message: Tigran Aivazian: "Re: filesystems"
- In reply to: Alan Cox: "Re: linux-2.2.18-pre19 asm/delay.h problem?"
- Next in thread: Pauline Middelink: "Re: linux-2.2.18-pre19 asm/delay.h problem?"
- Reply: Pauline Middelink: "Re: linux-2.2.18-pre19 asm/delay.h problem?"

Alan Cox wrote:
> > module that is pulling the definition of udelay() from asm/delay.h, it's
> > referencing __bad_udelay(). However, I can't seem to find the __bad_udelay()
> > function actually defined anyplace. (Although it could be somewhere in the
> > kernel source that my grep missed.)
>
> Its intentionally missing

Alan, Linus,

Would it be an idea to define __bad_udelay() somewhere? (No don't stop
reading!) ....

.... Inside a #if 0. This question keeps on popping up, and people
seem to be able to grep for definitions of stuff well enough. Then
near the definition you can explain this. It's a form of documenting
this "trick"...

#if 0
/* Note: This definition is not for real. The idea about __bad_udelay is
that you get a compile-time error if you call udelay with a number of
microseconds that is too large for udelay. There is mdelay if you need
delays on the order of miliseconds. Please update the places where
udelay is called with this large constant!

If you change the #if 0 to #if 1, the stuff you're trying to compile will
compile, but you'll crash your system when it's used.
*/

#define __bad_udelay() panic("Udelay called with too large a constant")
#endif

Roger.

    --
    ** R.E.Wolff@BitWizard.nl ** http://www.BitWizard.nl/ ** +31-15-2137555 **
    *-- BitWizard writes Linux device drivers for any device you may have! --*
    * There are old pilots, and there are bold pilots.
    * There are also old, bald pilots.
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    Please read the FAQ at http://www.tux.org/lkml/

- Next message: David S. Miller: "Re: [BUG] 2.2.1[78] : RTNETLINK lock not properly locking ?"
- Previous message: Tigran Aivazian: "Re: filesystems"
- In reply to: Alan Cox: "Re: linux-2.2.18-pre19 asm/delay.h problem?"
- Next in thread: Pauline Middelink: "Re: linux-2.2.18-pre19 asm/delay.h problem?"
- Reply: Pauline Middelink: "Re: linux-2.2.18-pre19 asm/delay.h problem?"