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

Last change on this file since 149 was 142, checked in by ktk, 25 years ago

Import

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 873 bytes
Line 
1/* $Id: delay.h 142 2000-04-23 14:55:46Z ktk $ */
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
30#include <iodelay.h>
31
32#define mdelay(n) iodelay(n*2)
33
34#endif /* defined(_LINUX_DELAY_H) */
Note: See TracBrowser for help on using the repository browser.