summaryrefslogtreecommitdiffhomepage
path: root/compat/macros1.h
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2019-02-11 15:52:03 +0100
committerStanislaw Halik <sthalik@misaki.pl>2019-02-11 18:44:03 +0100
commitaa3b01a556a60ce09123e93263642193da86982b (patch)
tree37c89d7e9350c2cb2d8fc48792966af790df0e29 /compat/macros1.h
parent1f17378532c24e2442b9fff8ccb5ea0b0936a2c0 (diff)
compat/macros: remove prefix
Let's not be concerned about global namespace pollution. These identifiers aren't exposed in the api/ directory.
Diffstat (limited to 'compat/macros1.h')
-rw-r--r--compat/macros1.h37
1 files changed, 12 insertions, 25 deletions
diff --git a/compat/macros1.h b/compat/macros1.h
index 148e1a77..96c09af4 100644
--- a/compat/macros1.h
+++ b/compat/macros1.h
@@ -1,15 +1,15 @@
#pragma once
#if defined _MSC_VER
-# define cc_noinline __declspec(noinline)
+# define never_inline __declspec(noinline)
#else
-# define cc_noinline __attribute__((noinline))
+# define never_inline __attribute__((noinline))
#endif
#if defined _MSC_VER
-# define cc_forceinline __forceinline
+# define force_inline __forceinline
#else
-# define cc_forceinline __attribute__((always_inline))
+# define force_inline __attribute__((always_inline))
#endif
#if !defined likely
@@ -23,31 +23,18 @@
#endif
#if defined _MSC_VER
-# define cc_function_name __FUNCSIG__
+# define function_name __FUNCSIG__
#else
-# define cc_function_name __PRETTY_FUNCTION__
+# define function_name __PRETTY_FUNCTION__
#endif
-#if !defined PP_CAT
-# define PP_CAT(x,y) PP_CAT1(x,y)
-# define PP_CAT1(x,y) PP_CAT2(x,y)
-# define PP_CAT2(x,y) x ## y
-#endif
-
-#ifndef PP_EXPAND
-# define PP_EXPAND(x) PP_EXPAND2(x)
-# define PP_EXPAND2(x) PP_EXPAND3(x) x
-# define PP_EXPAND3(x) x
-#endif
+#define PP_CAT(x,y) PP_CAT1(x,y)
+#define PP_CAT1(x,y) PP_CAT2(x,y)
+#define PP_CAT2(x,y) x ## y
-#ifdef _MSC_VER
-//# include <windows.h>
-//# define FULL_BARRIER MemoryBarrier()
-# define COMPILER_BARRIER() _ReadWriteBarrier()
-#else
-//# define FULL_BARRIER() __sync_synchronize()
-# define COMPILER_BARRIER() asm volatile("" ::: "memory")
-#endif
+#define PP_EXPAND(x) PP_EXPAND2(x)
+#define PP_EXPAND2(x) PP_EXPAND3(x) x
+#define PP_EXPAND3(x) x
#ifdef _MSC_VER
# define unreachable() __assume(0)