]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/input/lib/src/emul_time.c
5596b353f19b41384e317d4395ccafc204a0e703
[l4.git] / l4 / pkg / input / lib / src / emul_time.c
1 /*****************************************************************************/
2 /**
3  * \file   input/lib/src/emul_time.c
4  * \brief  L4INPUT: Linux time emulation
5  *
6  * \date   2007-05-29
7  * \author Christian Helmuth <ch12@os.inf.tu-dresden.de>
8  * \author Frank Mehnert <fm3@os.inf.tu-dresden.de>
9  *
10  */
11 /*
12  * (c) 2007-2009 Technische Universität Dresden
13  * This file is part of TUD:OS and distributed under the terms of the
14  * GNU General Public License 2.
15  * Please see the COPYING-GPL-2 file for details.
16  */
17
18 /* L4 */
19 #ifndef ARCH_arm
20 #include <l4/util/rdtsc.h>     /* XXX x86 specific */
21 #endif
22 #include <l4/util/util.h>
23
24 /* Linux */
25 #include <asm/delay.h>
26
27 /* UDELAY */
28 void udelay(unsigned long usecs)
29 {
30 #ifdef ARCH_arm
31   l4_sleep(usecs/1000); // XXX
32 #else
33   l4_busy_wait_us(usecs);
34 #endif
35 }