source: sbliveos2/trunk/include/linux/delay.h@ 188

Last change on this file since 188 was 151, checked in by sandervl, 25 years ago

update

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 954 bytes
Line 
1/* $Id: delay.h 151 2000-05-28 16:50:46Z sandervl $ */
2
3#ifndef _LINUX_DELAY_H
4#define _LINUX_DELAY_H
5
6/*
7 * Copyright (C) 1993 Linus Torvalds
8 *
9 * Delay routines, using a pre-computed "loops_per_second" value.
10 */
11
12extern unsigned long loops_per_sec;
13
14#include <asm/delay.h>
15
16/*
17 * Using udelay() for intervals greater than a few milliseconds can
18 * risk overflow for high loops_per_sec (high bogomips) machines. The
19 * mdelay() provides a wrapper to prevent this. For delays greater
20 * than MAX_UDELAY_MS milliseconds, the wrapper is used. Architecture
21 * specific values can be defined in asm-???/delay.h as an override.
22 * The 2nd mdelay() definition ensures GCC will optimize away the
23 * while loop for the common cases where n <= MAX_UDELAY_MS -- Paul G.
24 */
25
26#ifndef MAX_UDELAY_MS
27#define MAX_UDELAY_MS 5
28#endif
29
30void iodelay(unsigned long);
31#pragma aux iodelay parm nomemory [ecx] modify nomemory exact [eax ecx];
32
33#define mdelay(n) iodelay(n*2)
34
35#endif /* defined(_LINUX_DELAY_H) */
Note: See TracBrowser for help on using the repository browser.