From c53a55b6db53de6691660483e1a5d695a43ac090 Mon Sep 17 00:00:00 2001 From: Jakob Kaivo Date: Wed, 12 Aug 2020 13:20:36 -0400 Subject: add macro for use where thread local storage is required --- src/_perthread.h | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/_perthread.h (limited to 'src') diff --git a/src/_perthread.h b/src/_perthread.h new file mode 100644 index 00000000..5559bb60 --- /dev/null +++ b/src/_perthread.h @@ -0,0 +1,11 @@ +#ifndef ___PERTHREAD_H__ +#define ___PERTHREAD_H__ + +#if defined __STDC_VERSION__ && 201112L <= __STDC_VERSION__ && !defined __STDC_N +O_THREADS__ +#define THREAD_LOCAL static _Thread_local +#else +#define THREAD_LOCAL static +#endif + +#endif -- cgit v1.2.1