From 749be67df32b25049b1916b46fd21a58ed8010c6 Mon Sep 17 00:00:00 2001 From: Bananymous Date: Sat, 13 Jul 2024 00:40:27 +0300 Subject: [PATCH] Kernel: Fix cxxabi for function static variable guards --- kernel/icxxabi.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/icxxabi.cpp b/kernel/icxxabi.cpp index a1f334db..58879a84 100644 --- a/kernel/icxxabi.cpp +++ b/kernel/icxxabi.cpp @@ -42,20 +42,20 @@ namespace __cxxabiv1 { using __guard = uint64_t; - int __cxa_guard_acquire (__guard* g) + extern "C" int __cxa_guard_acquire (__guard* g) { uint8_t* byte = reinterpret_cast(g); uint8_t zero = 0; return __atomic_compare_exchange_n(byte, &zero, 1, false, __ATOMIC_ACQUIRE, __ATOMIC_ACQUIRE); } - void __cxa_guard_release (__guard* g) + extern "C" void __cxa_guard_release (__guard* g) { uint8_t* byte = reinterpret_cast(g); __atomic_store_n(byte, 0, __ATOMIC_RELEASE); } - void __cxa_guard_abort (__guard*) + extern "C" void __cxa_guard_abort (__guard*) { Kernel::panic("__cxa_guard_abort"); }