summaryrefslogtreecommitdiff
path: root/AK/Memory.h
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-04-30 11:43:25 +0200
committerAndreas Kling <kling@serenityos.org>2020-04-30 11:43:25 +0200
commit888e35f0fed393e8496414e5c285cf4ca4788f67 (patch)
treeaa88e2b38bcb7cbb82adb0c0420401b7cb19dcf0 /AK/Memory.h
parentf1a8fb1e88f902c9af2f1b18e6375c0b75f7e711 (diff)
downloadserenity-888e35f0fed393e8496414e5c285cf4ca4788f67.zip
AK: Add ALWAYS_INLINE, NEVER_INLINE and FLATTEN macros
It's tedious to write (and look at) [[gnu::always_inline]] etc. :^)
Diffstat (limited to 'AK/Memory.h')
-rw-r--r--AK/Memory.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/AK/Memory.h b/AK/Memory.h
index 27b5d2c54b..4d2efb012c 100644
--- a/AK/Memory.h
+++ b/AK/Memory.h
@@ -13,7 +13,7 @@
extern "C" void* mmx_memcpy(void* to, const void* from, size_t);
#endif
-[[gnu::always_inline]] inline void fast_u32_copy(u32* dest, const u32* src, size_t count)
+ALWAYS_INLINE void fast_u32_copy(u32* dest, const u32* src, size_t count)
{
#if defined(__serenity__) && !defined(KERNEL) && !defined(BOOTSTRAPPER)
if (count >= 256) {
@@ -28,7 +28,7 @@ extern "C" void* mmx_memcpy(void* to, const void* from, size_t);
: "memory");
}
-[[gnu::always_inline]] inline void fast_u32_fill(u32* dest, u32 value, size_t count)
+ALWAYS_INLINE void fast_u32_fill(u32* dest, u32 value, size_t count)
{
asm volatile(
"rep stosl\n"