diff options
author | Jakob Kaivo <jkk@ung.org> | 2020-08-12 13:20:36 -0400 |
---|---|---|
committer | Jakob Kaivo <jkk@ung.org> | 2020-08-12 13:20:36 -0400 |
commit | c53a55b6db53de6691660483e1a5d695a43ac090 (patch) | |
tree | e1d69801a6a3c55c187a17d4fc4e042e57233619 /src/_perthread.h | |
parent | 11d0cc5d2a1dbdd8eaf42e866503f31f90263c69 (diff) |
add macro for use where thread local storage is required
Diffstat (limited to 'src/_perthread.h')
-rw-r--r-- | src/_perthread.h | 11 |
1 files changed, 11 insertions, 0 deletions
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 |