direct-io.hg

view xen/include/asm-powerpc/delay.h @ 12910:95cead06e4ab

[POWERPC][XEN] attempt to adjust thread priority is futile and meaningless
Signed-off-by: Jimi Xenidis <jimix@watson.ibm.com>
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
author Jimi Xenidis <jimix@watson.ibm.com>
date Thu Sep 21 13:48:24 2006 -0400 (2006-09-21)
parents e108c5ac16ac
children
line source
1 /*
2 * This program is free software; you can redistribute it and/or modify
3 * it under the terms of the GNU General Public License as published by
4 * the Free Software Foundation; either version 2 of the License, or
5 * (at your option) any later version.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 *
12 * You should have received a copy of the GNU General Public License
13 * along with this program; if not, write to the Free Software
14 * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15 *
16 * Copyright (C) IBM Corp. 2005, 2006
17 *
18 * Authors: Hollis Blanchard <hollisb@us.ibm.com>
19 * Jimi Xenidis <jimix@watson.ibm.com>
20 */
22 #ifndef _ASM_DELAY_H_
23 #define _ASM_DELAY_H_
25 #include <asm/time.h>
27 extern unsigned long ticks_per_usec;
28 #define __udelay udelay
29 static inline void udelay(unsigned long usecs)
30 {
31 unsigned long ticks = usecs * ticks_per_usec;
32 unsigned long s;
33 unsigned long e;
35 s = get_timebase();
36 do {
37 e = get_timebase();
38 } while ((e-s) < ticks);
39 }
40 #endif