summaryrefslogtreecommitdiffstats
path: root/llvm/lib/System/Unix/ThreadLocal.inc
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2009-06-25 21:58:01 +0000
committerOwen Anderson <resistor@mac.com>2009-06-25 21:58:01 +0000
commitf17f6f06faa4c034c9b0f778b99839978c87fa4b (patch)
tree5df8cda8bb8760bc4713320ef4b56fcaf341aa2b /llvm/lib/System/Unix/ThreadLocal.inc
parent2d2ee150eb48229140ef5fd669dc00d835b648ab (diff)
downloadbcm5719-llvm-f17f6f06faa4c034c9b0f778b99839978c87fa4b.tar.gz
bcm5719-llvm-f17f6f06faa4c034c9b0f778b99839978c87fa4b.zip
Add a class for supporting platform independent thread-local storage.
Windows people, please double-check/patch this. llvm-svn: 74209
Diffstat (limited to 'llvm/lib/System/Unix/ThreadLocal.inc')
-rw-r--r--llvm/lib/System/Unix/ThreadLocal.inc25
1 files changed, 25 insertions, 0 deletions
diff --git a/llvm/lib/System/Unix/ThreadLocal.inc b/llvm/lib/System/Unix/ThreadLocal.inc
new file mode 100644
index 00000000000..6ee840d7255
--- /dev/null
+++ b/llvm/lib/System/Unix/ThreadLocal.inc
@@ -0,0 +1,25 @@
+//=== llvm/System/Unix/ThreadLocal.inc - Unix Thread Local Data -*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file implements the Unix specific (non-pthread) ThreadLocal class.
+//
+//===----------------------------------------------------------------------===//
+
+//===----------------------------------------------------------------------===//
+//=== WARNING: Implementation here must contain only generic UNIX code that
+//=== is guaranteed to work on *all* UNIX variants.
+//===----------------------------------------------------------------------===//
+
+namespace llvm {
+using namespace sys;
+ThreadLocalImpl::ThreadLocalImpl() { }
+ThreadLocalImpl::~ThreadLocalImpl() { }
+void ThreadLocalImpl::setInstance(void* d) { data = d; }
+void* ThreadLocalImpl::getInstance() { return data; }
+} \ No newline at end of file
OpenPOWER on IntegriCloud