diff --git a/kernel/icxxabi.cpp b/kernel/icxxabi.cpp index a1f334db9f..58879a8466 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"); }