Home | History | Annotate | Download | only in linux
      1 /****************************************************************************
      2  ****************************************************************************
      3  ***
      4  ***   This header was automatically generated from a Linux kernel header
      5  ***   of the same name, to make information necessary for userspace to
      6  ***   call into the kernel available to libc.  It contains only constants,
      7  ***   structures, and macros generated from the original header, and thus,
      8  ***   contains no copyrightable information.
      9  ***
     10  ****************************************************************************
     11  ****************************************************************************/
     12 #ifndef _LINUX_DELAY_H
     13 #define _LINUX_DELAY_H
     14 
     15 #include <asm/delay.h>
     16 
     17 #ifndef MAX_UDELAY_MS
     18 #define MAX_UDELAY_MS 5
     19 #endif
     20 
     21 #ifndef mdelay
     22 #define mdelay(n) (  (__builtin_constant_p(n) && (n)<=MAX_UDELAY_MS) ? udelay((n)*1000) :   ({unsigned long __ms=(n); while (__ms--) udelay(1000);}))
     23 #endif
     24 
     25 #ifndef ndelay
     26 #define ndelay(x) udelay(((x)+999)/1000)
     27 #endif
     28 
     29 #endif
     30