Karg  v0.2.0
The kernel of CargOS
types.h
Go to the documentation of this file.
1 #pragma once
2 
3 typedef __UINT8_TYPE__ u8;
4 typedef __UINT16_TYPE__ u16;
5 typedef __UINT32_TYPE__ u32;
6 typedef __UINT64_TYPE__ u64;
7 
8 #define U8_MAX 255
9 #define U16_MAX 65535
10 #define U32_MAX 4294967295U
11 #define U64_MAX 18446744073709551615U
12 
13 typedef __INT8_TYPE__ i8;
14 typedef __INT16_TYPE__ i16;
15 typedef __INT32_TYPE__ i32;
16 typedef __INT64_TYPE__ i64;
17 
18 #define I8_MIN -128
19 #define I16_MIN -32768
20 #define I32_MIN (-2147483647 - 1)
21 #define I64_MIN (-9223372036854775807 - 1)
22 
23 #define I8_MAX 127
24 #define I16_MAX 32767
25 #define I32_MAX 2147483647
26 #define I64_MAX 9223372036854775807
27 
28 typedef __UINTPTR_TYPE__ usize;
29 typedef __INTPTR_TYPE__ isize;
30 
31 #if __WORDSIZE == 64
32 #define ISIZE_MIN I64_MIN
33 #define USIZE_MAX U64_MAX
34 #define ISIZE_MAX I64_MAX
35 #else
36 #define ISIZE_MIN I32_MIN
37 #define USIZE_MAX U32_MAX
38 #define ISIZE_MAX I32_MAX
39 #endif
__INT8_TYPE__ i8
Definition: types.h:13
__INTPTR_TYPE__ isize
Definition: types.h:29
__INT32_TYPE__ i32
Definition: types.h:15
__UINTPTR_TYPE__ usize
Definition: types.h:28
__UINT64_TYPE__ u64
Definition: types.h:6
__UINT8_TYPE__ u8
Definition: types.h:3
__INT64_TYPE__ i64
Definition: types.h:16
__UINT16_TYPE__ u16
Definition: types.h:4
__UINT32_TYPE__ u32
Definition: types.h:5
__INT16_TYPE__ i16
Definition: types.h:14