diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-05-28 14:33:48 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2025-05-28 14:33:48 +0200 |
| commit | 46badbe70a36bb3cb5d86bd9f33aa5481c9709b9 (patch) | |
| tree | 33f3759845a25c51cea5d92177a3f7ebd269f984 /dev/LibCompiler/Defines.h | |
| parent | 0965112fb81ef3e04010197f68f743c98a7611ba (diff) | |
feat!: update the kernel codegen to output bit width and origin.
refactor!: refactor codebase, breaking changes.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'dev/LibCompiler/Defines.h')
| -rw-r--r-- | dev/LibCompiler/Defines.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/dev/LibCompiler/Defines.h b/dev/LibCompiler/Defines.h index 1735606..24d9a96 100644 --- a/dev/LibCompiler/Defines.h +++ b/dev/LibCompiler/Defines.h @@ -138,6 +138,15 @@ inline bool to_str(CharType* str, Int32 limit, Int32 base) noexcept { return true; } +inline bool install_signal(Int32 signal, void (*handler)(int)) noexcept { + if (handler == nullptr) return false; + + if (::signal(signal, handler) == SIG_ERR) { + return false; + } + + return true; +} } // namespace LibCompiler #define PACKED __attribute__((packed)) |
