diff options
Diffstat (limited to 'compiler-rt/lib/dfsan/dfsan_thread.cpp')
| -rw-r--r-- | compiler-rt/lib/dfsan/dfsan_thread.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/compiler-rt/lib/dfsan/dfsan_thread.cpp b/compiler-rt/lib/dfsan/dfsan_thread.cpp index e64f0f818fb8..c1d47514f4bd 100644 --- a/compiler-rt/lib/dfsan/dfsan_thread.cpp +++ b/compiler-rt/lib/dfsan/dfsan_thread.cpp @@ -5,7 +5,7 @@ #include "dfsan.h" #include "sanitizer_common/sanitizer_tls_get_addr.h" -namespace __dfsan { +using namespace __dfsan; DFsanThread *DFsanThread::Create(thread_callback_t start_routine, void *arg, bool track_origins) { @@ -99,7 +99,7 @@ bool DFsanThread::AddrIsInStack(uptr addr) { static pthread_key_t tsd_key; static bool tsd_key_inited = false; -void DFsanTSDInit(void (*destructor)(void *tsd)) { +void __dfsan::DFsanTSDInit(void (*destructor)(void *tsd)) { CHECK(!tsd_key_inited); tsd_key_inited = true; CHECK_EQ(0, pthread_key_create(&tsd_key, destructor)); @@ -107,9 +107,9 @@ void DFsanTSDInit(void (*destructor)(void *tsd)) { static THREADLOCAL DFsanThread *dfsan_current_thread; -DFsanThread *GetCurrentThread() { return dfsan_current_thread; } +DFsanThread *__dfsan::GetCurrentThread() { return dfsan_current_thread; } -void SetCurrentThread(DFsanThread *t) { +void __dfsan::SetCurrentThread(DFsanThread *t) { // Make sure we do not reset the current DFsanThread. CHECK_EQ(0, dfsan_current_thread); dfsan_current_thread = t; @@ -118,7 +118,7 @@ void SetCurrentThread(DFsanThread *t) { pthread_setspecific(tsd_key, t); } -void DFsanTSDDtor(void *tsd) { +void __dfsan::DFsanTSDDtor(void *tsd) { DFsanThread *t = (DFsanThread *)tsd; if (t->destructor_iterations_ > 1) { t->destructor_iterations_--; @@ -130,5 +130,3 @@ void DFsanTSDDtor(void *tsd) { atomic_signal_fence(memory_order_seq_cst); DFsanThread::TSDDtor(tsd); } - -} // namespace __dfsan |
