diff --git a/src/ds/bits.h b/src/ds/bits.h index c07ad92..9ba07d3 100644 --- a/src/ds/bits.h +++ b/src/ds/bits.h @@ -9,10 +9,10 @@ # define ALWAYSINLINE __forceinline # define NOINLINE __declspec(noinline) # define HEADER_GLOBAL __declspec(selectany) -# define likely(x) !!(x) +# define likely(x) !!(x) # define unlikely(x) !!(x) #else -# define likely(x) __builtin_expect(!!(x), 1) +# define likely(x) __builtin_expect(!!(x), 1) # define unlikely(x) __builtin_expect(!!(x), 0) # include # include diff --git a/src/mem/alloc.h b/src/mem/alloc.h index e16c2bd..3ee67c7 100644 --- a/src/mem/alloc.h +++ b/src/mem/alloc.h @@ -869,7 +869,7 @@ namespace snmalloc remote.post(id()); } - inline void handle_message_queue() + ALWAYSINLINE void handle_message_queue() { // Inline the empty check, but not necessarily the full queue handling. if (likely(message_queue().is_empty())) diff --git a/src/mem/threadalloc.h b/src/mem/threadalloc.h index 6892dcd..717a6a2 100644 --- a/src/mem/threadalloc.h +++ b/src/mem/threadalloc.h @@ -224,7 +224,7 @@ namespace snmalloc * Private accessor to the per thread allocator * Provides no checking for initialization */ - static inline Alloc*& inner_get() + static ALWAYSINLINE Alloc*& inner_get() { static thread_local Alloc* per_thread; return per_thread; @@ -260,7 +260,7 @@ namespace snmalloc * Public interface, returns the allocator for the current thread, * constructing it if necessary. */ - static inline Alloc*& get() + static ALWAYSINLINE Alloc*& get() { Alloc*& per_thread = inner_get();