diff options
Diffstat (limited to 'rt')
| -rw-r--r-- | rt/README | 5 | ||||
| -rw-r--r-- | rt/assert.h | 6 | ||||
| -rw-r--r-- | rt/meson.build | 1 | ||||
| -rw-r--r-- | rt/rt.h | 8 | ||||
| -rw-r--r-- | rt/stddef.h | 8 | ||||
| -rw-r--r-- | rt/stdint.h | 21 |
6 files changed, 49 insertions, 0 deletions
diff --git a/rt/README b/rt/README new file mode 100644 index 0000000..2cfdd3f --- /dev/null +++ b/rt/README @@ -0,0 +1,5 @@ +The [rt] module contains definitions and declarations of things +that are used very commonly throughout the codebase. + +The module notably exposes the rt.h header importing the most +common files within this module for convenience.
\ No newline at end of file diff --git a/rt/assert.h b/rt/assert.h new file mode 100644 index 0000000..f000d70 --- /dev/null +++ b/rt/assert.h @@ -0,0 +1,6 @@ +#ifndef RT_ASSERT_H +#define RT_ASSERT_H + +#define static_assert _Static_assert + +#endif
\ No newline at end of file diff --git a/rt/meson.build b/rt/meson.build new file mode 100644 index 0000000..86de68f --- /dev/null +++ b/rt/meson.build @@ -0,0 +1 @@ +kernel_inc += include_directories('.')
\ No newline at end of file @@ -0,0 +1,8 @@ +#ifndef RT_RT_H +#define RT_RT_H + +#include "assert.h" +#include "stdint.h" +#include "stddef.h" + +#endif
\ No newline at end of file diff --git a/rt/stddef.h b/rt/stddef.h new file mode 100644 index 0000000..83d9957 --- /dev/null +++ b/rt/stddef.h @@ -0,0 +1,8 @@ +#ifndef RT_STDDEF_H +#define RT_STDDEF_H + +#define nil ((void*)0) + +#define ALIGN_UP(X, F) ((X) - (X) % (F) + (F)) + +#endif
\ No newline at end of file diff --git a/rt/stdint.h b/rt/stdint.h new file mode 100644 index 0000000..f7ee056 --- /dev/null +++ b/rt/stdint.h @@ -0,0 +1,21 @@ +#ifndef RT_STDINT_H +#define RT_STDINT_H + +#include "assert.h" + +typedef unsigned char uchar; + +typedef unsigned short int ushort; + +typedef unsigned int uint; + +typedef unsigned long int ulong; + +typedef long long int vlong; +typedef unsigned long long int uvlong; + +// Machine specific types + +#include <arch_stdint.h> + +#endif
\ No newline at end of file |
