KallistiOS  ##version##
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
types.h
Go to the documentation of this file.
1 /* KallistiOS ##version##
2 
3  arch/dreamcast/include/types.h
4  (c)2000-2001 Dan Potter
5 
6 */
7 
8 /** \file arch/types.h
9  \brief Common integer types.
10 
11  This file contains typedefs for some common/useful integer types. These
12  types include ones that tell you exactly how long they are, as well as some
13  BSD-isms.
14 
15  \author Dan Potter
16 */
17 
18 #ifndef __ARCH_TYPES_H
19 #define __ARCH_TYPES_H
20 
21 #include <sys/cdefs.h>
22 __BEGIN_DECLS
23 
24 #include <stddef.h>
25 
26 /* Generic types */
27 typedef unsigned long long uint64; /**< \brief 64-bit unsigned integer */
28 typedef unsigned long uint32; /**< \brief 32-bit unsigned integer */
29 typedef unsigned short uint16; /**< \brief 16-bit unsigned integer */
30 typedef unsigned char uint8; /**< \brief 8-bit unsigned integer */
31 typedef long long int64; /**< \brief 64-bit signed integer */
32 typedef long int32; /**< \brief 32-bit signed integer */
33 typedef short int16; /**< \brief 16-bit signed integer */
34 typedef char int8; /**< \brief 8-bit signed integer */
35 
36 /* Volatile types */
37 typedef volatile uint64 vuint64; /**< \brief 64-bit volatile unsigned type */
38 typedef volatile uint32 vuint32; /**< \brief 32-bit volatile unsigned type */
39 typedef volatile uint16 vuint16; /**< \brief 16-bit volatile unsigned type */
40 typedef volatile uint8 vuint8; /**< \brief 8-bit volatile unsigned type */
41 typedef volatile int64 vint64; /**< \brief 64-bit volatile signed type */
42 typedef volatile int32 vint32; /**< \brief 32-bit volatile signed type */
43 typedef volatile int16 vint16; /**< \brief 16-bit volatile signed type */
44 typedef volatile int8 vint8; /**< \brief 8-bit volatile signed type */
45 
46 /* Pointer arithmetic types */
47 typedef uint32 ptr_t; /**< \brief Pointer arithmetic type */
48 
49 /* another format for type names */
50 #ifndef _BSDTYPES_DEFINED
51 
52 /* \cond */
53 #define __u_char_defined
54 #define __u_short_defined
55 #define __u_int_defined
56 #define __u_long_defined
57 #define __ushort_defined
58 #define __uint_defined
59 /* \endcond */
60 
61 typedef unsigned char u_char; /**< \brief BSD-style unsigned char */
62 typedef unsigned short u_short; /**< \brief BSD-style unsigned short */
63 typedef unsigned int u_int; /**< \brief BSD-style unsigned integer */
64 typedef unsigned long u_long; /**< \brief BSD-style unsigned long */
65 typedef unsigned short ushort; /**< \brief BSD-style unsigned short */
66 typedef unsigned int uint; /**< \brief BSD-style unsigned integer */
67 
68 /* \cond */
69 #define _BSDTYPES_DEFINED
70 /* \endcond */
71 
72 #endif /* _BSDTYPES_DEFINED */
73 
74 /* This type may be used for any generic handle type that is allowed
75  to be negative (for errors) and has no specific bit count
76  restraints. */
77 typedef int handle_t; /**< \brief Generic "handle" type */
78 
79 /* Thread and priority types */
80 typedef handle_t tid_t; /**< \brief Thread ID type */
81 typedef handle_t prio_t; /**< \brief Priority value type */
82 
83 /* Make sure to pull in the base endianness defines... */
84 #ifndef LITTLE_ENDIAN
85 #include <sys/_types.h>
86 #endif
87 
88 /** \brief Endianness definition -- Little Endian */
89 #define BYTE_ORDER LITTLE_ENDIAN
90 
91 __END_DECLS
92 
93 #endif /* __ARCH_TYPES_H */
94 
volatile uint16 vuint16
16-bit volatile unsigned type
Definition: types.h:39
unsigned int u_int
BSD-style unsigned integer.
Definition: types.h:63
int handle_t
Generic "handle" type.
Definition: types.h:77
long int32
32-bit signed integer
Definition: types.h:32
handle_t tid_t
Thread ID type.
Definition: types.h:80
unsigned short u_short
BSD-style unsigned short.
Definition: types.h:62
unsigned long long uint64
64-bit unsigned integer
Definition: types.h:27
short int16
16-bit signed integer
Definition: types.h:33
volatile uint32 vuint32
32-bit volatile unsigned type
Definition: types.h:38
unsigned short uint16
16-bit unsigned integer
Definition: types.h:29
uint32 ptr_t
Pointer arithmetic type.
Definition: types.h:47
volatile int16 vint16
16-bit volatile signed type
Definition: types.h:43
volatile int32 vint32
32-bit volatile signed type
Definition: types.h:42
volatile uint8 vuint8
8-bit volatile unsigned type
Definition: types.h:40
unsigned long uint32
32-bit unsigned integer
Definition: types.h:28
volatile int64 vint64
64-bit volatile signed type
Definition: types.h:41
volatile uint64 vuint64
64-bit volatile unsigned type
Definition: types.h:37
unsigned long u_long
BSD-style unsigned long.
Definition: types.h:64
long long int64
64-bit signed integer
Definition: types.h:31
unsigned char uint8
8-bit unsigned integer
Definition: types.h:30
unsigned int uint
BSD-style unsigned integer.
Definition: types.h:66
volatile int8 vint8
8-bit volatile signed type
Definition: types.h:44
Internal typedefs.
unsigned char u_char
BSD-style unsigned char.
Definition: types.h:61
char int8
8-bit signed integer
Definition: types.h:34
handle_t prio_t
Priority value type.
Definition: types.h:81
unsigned short ushort
BSD-style unsigned short.
Definition: types.h:65