]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/input/lib/src/emul_time.c
update
[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 Author(s)
13  *     economic rights: Technische Universität Dresden (Germany)
14  *
15  * This file is part of TUD:OS and distributed under the terms of the
16  * GNU General Public License 2.
17  * Please see the COPYING-GPL-2 file for details.
18  */
19
20 /* L4 */
21 #if !defined(ARCH_arm) && !defined(ARCH_sparc)
22 #include <l4/util/rdtsc.h>     /* XXX x86 specific */
23 #endif
24 #include <l4/util/util.h>
25
26 /* Linux */
27 #include <asm/delay.h>
28
29 /* UDELAY */
30 void udelay(unsigned long usecs)
31 {
32 #ifdef ARCH_arm
33   l4_sleep(usecs/1000); // XXX
34 #else
35   l4_busy_wait_us(usecs);
36 #endif
37 }