FreeNOS
Types.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2009 Niek Linnenbank
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef __TYPES_H
19 #define __TYPES_H
20 
21 #ifndef __ASSEMBLER__
22 
36 #define BITWISE
37 
44 typedef unsigned int uint;
45 
47 typedef unsigned long ulong;
48 
50 typedef unsigned long long u64;
51 
53 typedef unsigned int u32;
54 
56 typedef unsigned short u16;
57 
59 typedef unsigned char u8;
60 
71 typedef signed int sint;
72 
74 typedef signed long slong;
75 
77 typedef signed long long s64;
78 
80 typedef signed int s32;
81 
83 typedef signed short int s16;
84 
86 typedef signed char s8;
87 
100 typedef u64 BITWISE le64;
101 
103 typedef u64 BITWISE be64;
104 
106 typedef u32 BITWISE le32;
107 
109 typedef u32 BITWISE be32;
110 
112 typedef u16 BITWISE le16;
113 
115 typedef u16 BITWISE be16;
116 
118 typedef u8 BITWISE le8;
119 
121 typedef u8 BITWISE be8;
122 
128 typedef unsigned int Size;
129 
131 typedef unsigned long Address;
132 
134 typedef unsigned short UserID;
135 
137 typedef unsigned short GroupID;
138 
140 typedef u32 ProcessID;
141 
145 typedef struct DeviceID
146 {
149 
152 }
153 DeviceID;
154 
159 typedef slong Error;
160 
161 #ifdef __cplusplus
162 
163 namespace Number
164 {
168  typedef enum Base
169  {
170  Dec,
171  Hex,
172  }
173  Base;
174 };
175 
176 #endif /* __cplusplus */
177 
183 #endif /* __ASSEMBLER__ */
184 #endif /* __TYPES_H */
DeviceID::minor
u16 minor
Device specific minor ID number.
Definition: Types.h:151
le64
u64 BITWISE le64
Unsigned 64-bit little endian number.
Definition: Types.h:100
ulong
unsigned long ulong
Unsigned long number.
Definition: Types.h:47
GroupID
unsigned short GroupID
Group Identity.
Definition: Types.h:137
le16
u16 BITWISE le16
Unsigned 16-bit little endian number.
Definition: Types.h:112
be8
u8 BITWISE be8
Unsigned 8-bit big endian number.
Definition: Types.h:121
ProcessID
u32 ProcessID
Process Identification Number.
Definition: Types.h:140
Address
unsigned long Address
A memory address.
Definition: Types.h:131
Number::Base
Base
Numeral system base type.
Definition: Types.h:168
Number::Dec
@ Dec
Definition: Types.h:170
s64
signed long long s64
Signed 64-bit number.
Definition: Types.h:77
uint
unsigned int uint
Unsigned integer number.
Definition: Types.h:44
be16
u16 BITWISE be16
Unsigned 16-bit big endian number.
Definition: Types.h:115
u64
unsigned long long u64
Unsigned 64-bit number.
Definition: Types.h:50
slong
signed long slong
Signed long number.
Definition: Types.h:74
u16
unsigned short u16
Unsigned 16-bit number.
Definition: Types.h:56
Error
slong Error
Error code defined in Error.h.
Definition: Types.h:159
u32
unsigned int u32
Unsigned 32-bit number.
Definition: Types.h:53
Size
unsigned int Size
Any sane size indicator cannot go negative.
Definition: Types.h:128
s32
signed int s32
Signed 32-bit number.
Definition: Types.h:80
BITWISE
#define BITWISE
Restrict bit operations.
Definition: Types.h:36
s8
signed char s8
Signed 8-bit number.
Definition: Types.h:86
DeviceID::major
ProcessID major
Major device ID number is a PID.
Definition: Types.h:148
s16
signed short int s16
Signed 16-bit number.
Definition: Types.h:83
be64
u64 BITWISE be64
Unsigned 64-bit big endian number.
Definition: Types.h:103
be32
u32 BITWISE be32
Unsigned 32-bit big endian number.
Definition: Types.h:109
DeviceID
struct DeviceID DeviceID
Describes a device ID number.
le32
u32 BITWISE le32
Unsigned 32-bit little endian number.
Definition: Types.h:106
le8
u8 BITWISE le8
Unsigned 8-bit little endian number.
Definition: Types.h:118
UserID
unsigned short UserID
User Identity.
Definition: Types.h:134
u8
unsigned char u8
Unsigned 8-bit number.
Definition: Types.h:59
sint
signed int sint
Signed integer number.
Definition: Types.h:71
DeviceID
Describes a device ID number.
Definition: Types.h:145
Number::Hex
@ Hex
Decimal: 0-10.
Definition: Types.h:171
Number
Definition: Types.h:163