diff options
| author | Nathan Lee <me@nwlee.tech> | 2026-09-25 23:24:31 -0500 |
|---|---|---|
| committer | Nathan Lee <me@nwlee.tech> | 2026-09-25 23:24:31 -0500 |
| commit | 548905a86473101325540446f35ffda8acd0c3bb (patch) | |
| tree | 57e495fbdb302d83880bd36e7368cdb48cd23e25 /website-kernel/include | |
| parent | 6858c9e7c97f772eb357e3eee0c1fcfb8adcb699 (diff) | |
scaffold kernel from parts of wkern x86
Diffstat (limited to 'website-kernel/include')
| -rw-r--r-- | website-kernel/include/int.h | 8 | ||||
| -rw-r--r-- | website-kernel/include/log.h | 11 |
2 files changed, 19 insertions, 0 deletions
diff --git a/website-kernel/include/int.h b/website-kernel/include/int.h new file mode 100644 index 0000000..2a378e7 --- /dev/null +++ b/website-kernel/include/int.h @@ -0,0 +1,8 @@ +#pragma once +#define NULL (void*)0 + +typedef __UINTPTR_TYPE__ size_t; +typedef __UINT8_TYPE__ uint8_t; +typedef __UINT16_TYPE__ uint16_t; +typedef __UINT32_TYPE__ uint32_t; +typedef __UINT64_TYPE__ uint64_t; diff --git a/website-kernel/include/log.h b/website-kernel/include/log.h new file mode 100644 index 0000000..4312baf --- /dev/null +++ b/website-kernel/include/log.h @@ -0,0 +1,11 @@ +#pragma once + +#define RINGBUF_SIZE 64 * 1024 + +typedef void (*console_callback_t)(char); + +void vprintk(const char *message, __builtin_va_list args); +void printk(const char *message, ...); + +void register_console_callback(console_callback_t callback); + |
