ia64/xen-unstable

view stubdom/grub/osdep.h @ 18026:f454f2cac170

x86 hvm: New boot option 'softtsc' to cause RDTSC to be trapped-and-emulated.

Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Jul 10 15:45:18 2008 +0100 (2008-07-10)
parents c8d9ade45781
children
line source
1 #ifndef __OSDEP_H__
2 #define __OSDEP_H__
4 #include <byteswap.h>
5 #define swap32(x) bswap_32(x)
6 #define swap16(x) bswap_16(x)
8 #include <machine/endian.h>
9 #if BYTE_ORDER == BIG_ENDIAN
10 #define htons(x) (x)
11 #define ntohs(x) (x)
12 #define htonl(x) (x)
13 #define ntohl(x) (x)
14 #else
15 #define htons(x) swap16(x)
16 #define ntohs(x) swap16(x)
17 #define htonl(x) swap32(x)
18 #define ntohl(x) swap32(x)
19 #endif
21 typedef unsigned long Address;
23 /* ANSI prototyping macro */
24 #ifdef __STDC__
25 #define P(x) x
26 #else
27 #define P(x) ()
28 #endif
30 #endif