1
0
Fork 0
mirror of https://github.com/anrieff/libcpuid synced 2024-12-16 16:35:45 +00:00

Merge pull request #142 from ClickHouse-Extras/fix-tsan

Fix TSan report
This commit is contained in:
Veselin Georgiev 2020-05-11 09:10:48 +03:00 committed by GitHub
commit 8db3b8d2d3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -38,7 +38,13 @@
/* Implementation: */ /* Implementation: */
static int _libcpiud_errno = ERR_OK; #if defined(__STDC_VERSION__) && __STDC_VERSION__ == 201112L
_Thread_local int _libcpiud_errno = ERR_OK;
#elif defined(__GNUC__) // Also works for clang
__thread int _libcpiud_errno = ERR_OK;
#else
static int _libcpiud_errno = ERR_OK;
#endif
int set_error(cpu_error_t err) int set_error(cpu_error_t err)
{ {