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
44typedef unsigned int uint;
45
47typedef unsigned long ulong;
48
50typedef unsigned long long u64;
51
53typedef unsigned int u32;
54
56typedef unsigned short u16;
57
59typedef unsigned char u8;
60
71typedef signed int sint;
72
74typedef signed long slong;
75
77typedef signed long long s64;
78
80typedef signed int s32;
81
83typedef signed short int s16;
84
86typedef signed char s8;
87
101
104
107
110
113
116
118typedef u8 BITWISE le8;
119
121typedef u8 BITWISE be8;
122
128typedef unsigned int Size;
129
131typedef unsigned long Address;
132
134typedef unsigned short UserID;
135
137typedef unsigned short GroupID;
138
141
145typedef struct DeviceID
146{
149
152}
154
159typedef slong Error;
160
161#ifdef __cplusplus
162
163namespace Number
164{
168 typedef enum Base
169 {
172 }
174};
175
176#endif /* __cplusplus */
177
183#endif /* __ASSEMBLER__ */
184#endif /* __TYPES_H */
u32 ProcessID
Process Identification Number.
Definition Types.h:140
signed int s32
Signed 32-bit number.
Definition Types.h:80
u8 BITWISE le8
Unsigned 8-bit little endian number.
Definition Types.h:118
unsigned int u32
Unsigned 32-bit number.
Definition Types.h:53
signed char s8
Signed 8-bit number.
Definition Types.h:86
unsigned long Address
A memory address.
Definition Types.h:131
u32 BITWISE be32
Unsigned 32-bit big endian number.
Definition Types.h:109
slong Error
Error code defined in Error.h.
Definition Types.h:159
unsigned short UserID
User Identity.
Definition Types.h:134
signed long long s64
Signed 64-bit number.
Definition Types.h:77
signed short int s16
Signed 16-bit number.
Definition Types.h:83
u8 BITWISE be8
Unsigned 8-bit big endian number.
Definition Types.h:121
unsigned long ulong
Unsigned long number.
Definition Types.h:47
u16 BITWISE le16
Unsigned 16-bit little endian number.
Definition Types.h:112
#define BITWISE
Restrict bit operations.
Definition Types.h:36
u32 BITWISE le32
Unsigned 32-bit little endian number.
Definition Types.h:106
unsigned short GroupID
Group Identity.
Definition Types.h:137
unsigned int uint
Unsigned integer number.
Definition Types.h:44
unsigned short u16
Unsigned 16-bit number.
Definition Types.h:56
u16 BITWISE be16
Unsigned 16-bit big endian number.
Definition Types.h:115
unsigned int Size
Any sane size indicator cannot go negative.
Definition Types.h:128
unsigned long long u64
Unsigned 64-bit number.
Definition Types.h:50
signed int sint
Signed integer number.
Definition Types.h:71
signed long slong
Signed long number.
Definition Types.h:74
unsigned char u8
Unsigned 8-bit number.
Definition Types.h:59
u64 BITWISE be64
Unsigned 64-bit big endian number.
Definition Types.h:103
u64 BITWISE le64
Unsigned 64-bit little endian number.
Definition Types.h:100
Base
Numeral system base type.
Definition Types.h:169
@ Hex
Decimal: 0-10.
Definition Types.h:171
@ Dec
Definition Types.h:170
Describes a device ID number.
Definition Types.h:146
ProcessID major
Major device ID number is a PID.
Definition Types.h:148
u16 minor
Device specific minor ID number.
Definition Types.h:151