about summary refs log tree commit homepage
path: root/ext/mwrap/gcc.h
diff options
context:
space:
mode:
Diffstat (limited to 'ext/mwrap/gcc.h')
-rw-r--r--ext/mwrap/gcc.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/ext/mwrap/gcc.h b/ext/mwrap/gcc.h
new file mode 100644
index 0000000..2312aa9
--- /dev/null
+++ b/ext/mwrap/gcc.h
@@ -0,0 +1,13 @@
+/* CC0 (Public domain) - http://creativecommons.org/publicdomain/zero/1.0/ */
+#ifndef GCC_H
+#define GCC_H
+#define ATTR_COLD        __attribute__((cold))
+
+#if __STDC_VERSION__ >= 201112
+#        define MWRAP_TSD _Thread_local
+#elif defined(__GNUC__)
+#        define MWRAP_TSD __thread
+#else
+#        error _Thread_local nor __thread supported
+#endif
+#endif /* GCC_H */