summaryrefslogtreecommitdiff
path: root/kernel/old/include/types.h
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/old/include/types.h')
-rw-r--r--kernel/old/include/types.h53
1 files changed, 49 insertions, 4 deletions
diff --git a/kernel/old/include/types.h b/kernel/old/include/types.h
index 9435954..2f934f1 100644
--- a/kernel/old/include/types.h
+++ b/kernel/old/include/types.h
@@ -1,13 +1,58 @@
+/**
+** @file types.h
+**
+** @author Warren R. Carithers
+**
+** @brief Common type declarations.
+**
+** This header file contains type declarations used throughout
+** the kernel and user code.
+*/
+
#ifndef TYPES_H_
#define TYPES_H_
+
#ifndef ASM_SRC
+/*
+** Start of C-only definitions
+**
+** Anything that should not be visible to something other than
+** the C compiler should be put here.
+*/
+
+/*
+** Types
+*/
+
+// standard integer sized types
+typedef char int8_t;
+typedef unsigned char uint8_t;
+typedef short int16_t;
+typedef unsigned short uint16_t;
+typedef int int32_t;
+typedef unsigned int uint32_t;
+typedef long long int int64_t;
+typedef unsigned long long int uint64_t;
+
+// other integer types
+typedef unsigned char uchar_t;
+typedef unsigned int uint_t;
+typedef unsigned long int ulong_t;
+
+// Boolean values
+typedef uint8_t bool_t;
+
+#define true 1
+#define false 0
+
#ifdef KERNEL_SRC
// we define these here instead of in vm.h in order to get around a
// nasty chick/egg dependency between procs.h and vm.h
-typedef uint32_t pde_t; // page directory entry
-typedef uint32_t pte_t; // page table entry
-#endif /* KERNEL_SRC */
+typedef uint32_t pde_t; // page directory entry
+typedef uint32_t pte_t; // page table entry
+#endif /* KERNEL_SRC */
+
+#endif /* !ASM_SRC */
-#endif
#endif