diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2010-09-17 15:48:55 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2010-09-17 15:48:55 +0000 |
commit | d39c594d39df7f283c2fb8a704a3f31c501180d9 (patch) | |
tree | 36453626c792cccd91f783a38a169d610a6b9db9 /lib/System/ThreadLocal.cpp | |
parent | 6144c1de6a7674dad94290650e4e14f24d42e421 (diff) |
Notes
Diffstat (limited to 'lib/System/ThreadLocal.cpp')
-rw-r--r-- | lib/System/ThreadLocal.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/System/ThreadLocal.cpp b/lib/System/ThreadLocal.cpp index e7054b528147..f6a55a1c0b9b 100644 --- a/lib/System/ThreadLocal.cpp +++ b/lib/System/ThreadLocal.cpp @@ -27,6 +27,7 @@ ThreadLocalImpl::ThreadLocalImpl() { } ThreadLocalImpl::~ThreadLocalImpl() { } void ThreadLocalImpl::setInstance(const void* d) { data = const_cast<void*>(d);} const void* ThreadLocalImpl::getInstance() { return data; } +void ThreadLocalImpl::removeInstance() { data = 0; } } #else @@ -67,6 +68,10 @@ const void* ThreadLocalImpl::getInstance() { return pthread_getspecific(*key); } +void ThreadLocalImpl::removeInstance() { + setInstance(0); +} + } #elif defined(LLVM_ON_UNIX) |