Skip to content

Commit

Permalink
Define TLS as _Thread_local if the compiler supports C11 (#1304)
Browse files Browse the repository at this point in the history
  • Loading branch information
Scr3amer authored and jedisct1 committed Sep 1, 2023
1 parent 6256e09 commit 52b9053
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ BOOLEAN NTAPI RtlGenRandom(PVOID RandomBuffer, ULONG RandomBufferLength);
# endif
#endif

#if !defined(TLS) && !defined(__STDC_NO_THREADS__) && \
defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
# define TLS _Thread_local
#endif
#ifndef TLS
# ifdef _WIN32
# define TLS __declspec(thread)
Expand Down

0 comments on commit 52b9053

Please sign in to comment.