diff options
author | Brian Gaeke <gaeke@uiuc.edu> | 2003-12-01 21:33:31 +0000 |
---|---|---|
committer | Brian Gaeke <gaeke@uiuc.edu> | 2003-12-01 21:33:31 +0000 |
commit | 59e47e3ee10840beb57ece10af04a6f9bf3495e9 (patch) | |
tree | 8d410a2f8e3420d942b380d657379b30c220ed1a /lib/Support/Mutex.cpp | |
parent | a8df7bdbacc0795bdca383035d1a2169445ffb7e (diff) | |
download | external_llvm-59e47e3ee10840beb57ece10af04a6f9bf3495e9.zip external_llvm-59e47e3ee10840beb57ece10af04a6f9bf3495e9.tar.gz external_llvm-59e47e3ee10840beb57ece10af04a6f9bf3495e9.tar.bz2 |
Lock abstraction, introduced with a view toward making the JIT thread-safe.
Eventually.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10284 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/Mutex.cpp')
-rw-r--r-- | lib/Support/Mutex.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/lib/Support/Mutex.cpp b/lib/Support/Mutex.cpp new file mode 100644 index 0000000..6271797 --- /dev/null +++ b/lib/Support/Mutex.cpp @@ -0,0 +1,24 @@ +//===-- Support/Lock.cpp - Platform-agnostic mutual exclusion -------------===// +// +// The LLVM Compiler Infrastructure +// +// This file was developed by the LLVM research group and is distributed under +// the University of Illinois Open Source License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// Implementation of various methods supporting platform-agnostic lock +// abstraction. See Support/Lock.h for details. +// +//===----------------------------------------------------------------------===// + +#include "Support/Lock.h" + +using namespace llvm; + +Lock Lock::create () { + // Currently we only support creating POSIX pthread_mutex_t locks. + // In the future we might want to construct different kinds of locks + // based on what OS is running. + return POSIXLock (); +} |