OSDN Git Service

Check in released NDK version r4.
[android-x86/prebuilt.git] / ndk / android-ndk-r4 / linux / platforms / android-4 / arch-arm / usr / include / linux / delay.h
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