AK+DynamicLoader: Move optimizer_fence() into AK

This will allow us to use this function in other places.
This commit is contained in:
Sönke Holz authored and Sönke Holz committed 2026-08-16 16:57:03 +02:00
1 parent 1a3eb40582
commit 006de308b5
2 files changed
+7 -5

No files matched your search

+6
View File
@@ -20,9 +20,15 @@ static inline void atomic_thread_fence(MemoryOrder order) noexcept
return __atomic_thread_fence(order);
}
static inline void optimizer_fence()
{
asm volatile("" ::: "memory");
}
}
#if USING_AK_GLOBALLY
using AK::atomic_signal_fence;
using AK::atomic_thread_fence;
using AK::optimizer_fence;
#endif
+1 -5
View File
@@ -4,6 +4,7 @@
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <AK/Fences.h>
#include <AK/LexicalPath.h>
#include <AK/ScopeGuard.h>
#include <Kernel/API/POSIX/sys/stat.h>
@@ -147,11 +148,6 @@ NAKED void _start(int, char**, char**)
#endif
}
ALWAYS_INLINE static void optimizer_fence()
{
asm("" ::: "memory");
}
[[gnu::no_stack_protector]] void _entry(int argc, char** argv, char** envp)
{
char** env;