source: trunk/packages/xen-3.1/xen-3.1/extras/mini-os/include/types.h @ 34

Last change on this file since 34 was 34, checked in by hartmans, 18 years ago

Add xen and xen-common

File size: 2.0 KB
Line 
1/* -*-  Mode:C; c-basic-offset:4; tab-width:4 -*-
2 ****************************************************************************
3 * (C) 2003 - Rolf Neugebauer - Intel Research Cambridge
4 ****************************************************************************
5 *
6 *        File: types.h
7 *      Author: Rolf Neugebauer (neugebar@dcs.gla.ac.uk)
8 *     Changes:
9 *             
10 *        Date: May 2003
11 *
12 * Environment: Xen Minimal OS
13 * Description: a random collection of type definitions
14 *
15 ****************************************************************************
16 * $Id: h-insert.h,v 1.4 2002/11/08 16:03:55 rn Exp $
17 ****************************************************************************
18 */
19
20#ifndef _TYPES_H_
21#define _TYPES_H_
22
23typedef signed char         s8;
24typedef unsigned char       u8;
25typedef signed short        s16;
26typedef unsigned short      u16;
27typedef signed int          s32;
28typedef unsigned int        u32;
29#ifdef __i386__
30typedef signed long long    s64;
31typedef unsigned long long  u64;
32#elif defined(__x86_64__) || defined(__ia64__)
33typedef signed long         s64;
34typedef unsigned long       u64;
35#endif
36
37/* FreeBSD compat types */
38typedef unsigned char       u_char;
39typedef unsigned int        u_int;
40typedef unsigned long       u_long;
41#ifdef __i386__
42typedef long long           quad_t;
43typedef unsigned long long  u_quad_t;
44typedef unsigned int        uintptr_t;
45
46#if !defined(CONFIG_X86_PAE)
47typedef struct { unsigned long pte_low; } pte_t;
48#else
49typedef struct { unsigned long pte_low, pte_high; } pte_t;
50#endif /* CONFIG_X86_PAE */
51
52#elif defined(__x86_64__) || defined(__ia64__)
53typedef long                quad_t;
54typedef unsigned long       u_quad_t;
55typedef unsigned long       uintptr_t;
56
57typedef struct { unsigned long pte; } pte_t;
58#endif /* __i386__ || __x86_64__ */
59
60typedef  u8 uint8_t;
61typedef  s8 int8_t;
62typedef u16 uint16_t;
63typedef s16 int16_t;
64typedef u32 uint32_t;
65typedef s32 int32_t;
66typedef u64 uint64_t;
67typedef s64 int64_t;
68
69
70#define INT_MAX         ((int)(~0U>>1))
71#define UINT_MAX            (~0U)
72#endif /* _TYPES_H_ */
Note: See TracBrowser for help on using the repository browser.