mirror of
https://github.com/SerenityOS/serenity.git
synced 2026-11-07 04:29:30 -10:00
AK+DynamicLoader: Move optimizer_fence() into AK
This will allow us to use this function in other places.
This commit is contained in:
1 parent
1a3eb40582
commit
006de308b5
2 files changed
+7
-5
No files matched your search
@@ -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
|
||||
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user