diff options
author | Ed Schouten <ed@FreeBSD.org> | 2009-06-27 10:44:33 +0000 |
---|---|---|
committer | Ed Schouten <ed@FreeBSD.org> | 2009-06-27 10:44:33 +0000 |
commit | f859468f5a21b6952ab62917777f9fb3bba57003 (patch) | |
tree | 9794dc36f22f2a2b3f8063829d8a9b3a7794acc8 /lib/System/Unix | |
parent | f76359690a7035ad21498f2ba6be6991d3b2032d (diff) |
Diffstat (limited to 'lib/System/Unix')
-rw-r--r-- | lib/System/Unix/ThreadLocal.inc | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/System/Unix/ThreadLocal.inc b/lib/System/Unix/ThreadLocal.inc new file mode 100644 index 000000000000..83d554d3077c --- /dev/null +++ b/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(const void* d) { data = const_cast<void*>(d);} +const void* ThreadLocalImpl::getInstance() { return data; } +} |