From 46badbe70a36bb3cb5d86bd9f33aa5481c9709b9 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Wed, 28 May 2025 14:33:48 +0200 Subject: feat!: update the kernel codegen to output bit width and origin. refactor!: refactor codebase, breaking changes. Signed-off-by: Amlal El Mahrouss --- dev/LibCompiler/Defines.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'dev/LibCompiler/Defines.h') 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)) -- cgit v1.2.3