Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit e56dcce

Browse files
Use thread_local for thread local storage on non MSVC targets
1 parent 006fd89 commit e56dcce

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/vm/eventpipebuffermanager.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010

1111
#ifdef FEATURE_PERFTRACING
1212

13-
#ifndef __llvm__
13+
#ifndef __GNUC__
1414
__declspec(thread) ThreadEventBufferList ThreadEventBufferList::gCurrentThreadEventBufferList;
15-
#else // !__llvm__
15+
#else // !__GNUC__
1616
thread_local ThreadEventBufferList ThreadEventBufferList::gCurrentThreadEventBufferList;
17-
#endif // !__llvm__
17+
#endif // !__GNUC__
1818

1919
EventPipeBufferManager::EventPipeBufferManager()
2020
{

src/vm/eventpipebuffermanager.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ class EventPipeBufferList;
2121
// when the thread dies so we can free EventPipeBufferList in the destructor.
2222
class ThreadEventBufferList
2323
{
24-
#ifndef __llvm__
24+
#ifndef __GNUC__
2525
__declspec(thread) static ThreadEventBufferList gCurrentThreadEventBufferList;
26-
#else // !__llvm__
26+
#else // !__GNUC__
2727
thread_local static ThreadEventBufferList gCurrentThreadEventBufferList;
28-
#endif // !__llvm__
28+
#endif // !__GNUC__
2929
EventPipeBufferList * m_pThreadEventBufferList = NULL;
3030
~ThreadEventBufferList();
3131

0 commit comments

Comments
 (0)