Rev 3022 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3022 | Rev 4055 | ||
---|---|---|---|
Line 40... | Line 40... | ||
40 | # define ATTRIBUTE_PACKED __attribute__ ((packed)) |
40 | # define ATTRIBUTE_PACKED __attribute__ ((packed)) |
41 | #else |
41 | #else |
42 | # define ATTRIBUTE_PACKED |
42 | # define ATTRIBUTE_PACKED |
43 | #endif |
43 | #endif |
44 | 44 | ||
45 | #define NULL 0 |
- | |
46 | #define false 0 |
- | |
47 | #define true 1 |
- | |
48 | - | ||
49 | typedef signed char int8_t; |
45 | typedef signed char int8_t; |
50 | typedef signed short int16_t; |
46 | typedef signed short int16_t; |
51 | typedef signed long int32_t; |
47 | typedef signed long int32_t; |
52 | typedef signed long long int64_t; |
48 | typedef signed long long int64_t; |
53 | 49 | ||
Line 66... | Line 62... | ||
66 | typedef uint32_t ipl_t; |
62 | typedef uint32_t ipl_t; |
67 | 63 | ||
68 | typedef uint32_t unative_t; |
64 | typedef uint32_t unative_t; |
69 | typedef int32_t native_t; |
65 | typedef int32_t native_t; |
70 | 66 | ||
71 | typedef uint8_t bool; |
67 | typedef struct { |
72 | typedef uint64_t thread_id_t; |
- | |
73 | typedef uint64_t task_id_t; |
- | |
74 | typedef uint32_t context_id_t; |
- | |
75 | - | ||
76 | typedef int32_t inr_t; |
68 | } fncptr_t; |
77 | typedef int32_t devno_t; |
- | |
78 | 69 | ||
- | 70 | #define PRIp "x" /**< Format for uintptr_t. */ |
|
- | 71 | #define PRIs "u" /**< Format for size_t. */ |
|
- | 72 | #define PRIc "u" /**< Format for count_t. */ |
|
- | 73 | #define PRIi "u" /**< Format for index_t. */ |
|
- | 74 | ||
- | 75 | #define PRId8 "d" /**< Format for int8_t. */ |
|
- | 76 | #define PRId16 "d" /**< Format for int16_t. */ |
|
- | 77 | #define PRId32 "d" /**< Format for int32_t. */ |
|
- | 78 | #define PRId64 "lld" /**< Format for int64_t. */ |
|
- | 79 | #define PRIdn "d" /**< Format for native_t. */ |
|
- | 80 | ||
- | 81 | #define PRIu8 "u" /**< Format for uint8_t. */ |
|
- | 82 | #define PRIu16 "u" /**< Format for uint16_t. */ |
|
- | 83 | #define PRIu32 "u" /**< Format for uint32_t. */ |
|
- | 84 | #define PRIu64 "llu" /**< Format for uint64_t. */ |
|
- | 85 | #define PRIun "u" /**< Format for unative_t. */ |
|
- | 86 | ||
- | 87 | #define PRIx8 "x" /**< Format for hexadecimal (u)int8_t. */ |
|
- | 88 | #define PRIx16 "x" /**< Format for hexadecimal (u)int16_t. */ |
|
- | 89 | #define PRIx32 "x" /**< Format for hexadecimal (u)uint32_t. */ |
|
- | 90 | #define PRIx64 "llx" /**< Format for hexadecimal (u)int64_t. */ |
|
- | 91 | #define PRIxn "x" /**< Format for hexadecimal (u)native_t. */ |
|
79 | 92 | ||
80 | /** Page table entry. |
93 | /** Page table entry. |
81 | * |
94 | * |
82 | * We have different structs for level 0 and level 1 page table entries. |
95 | * We have different structs for level 0 and level 1 page table entries. |
83 | * See page.h for definition of pte_level*_t. |
96 | * See page.h for definition of pte_level*_t. |