summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/Mutex.cpp
diff options
context:
space:
mode:
authorBrian Gaeke <gaeke@uiuc.edu>2003-12-01 21:33:31 +0000
committerBrian Gaeke <gaeke@uiuc.edu>2003-12-01 21:33:31 +0000
commit93823ed30cf46064e37e586560978e58cab110d2 (patch)
tree5ed2aef2102fb28483c9ae33bc7780a58b8a85f5 /llvm/lib/Support/Mutex.cpp
parente0da6ec8b68a4c53f5114162f77c8bdf789fd25c (diff)
downloadbcm5719-llvm-93823ed30cf46064e37e586560978e58cab110d2.tar.gz
bcm5719-llvm-93823ed30cf46064e37e586560978e58cab110d2.zip
Lock abstraction, introduced with a view toward making the JIT thread-safe.
Eventually. llvm-svn: 10284
Diffstat (limited to 'llvm/lib/Support/Mutex.cpp')
-rw-r--r--llvm/lib/Support/Mutex.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/llvm/lib/Support/Mutex.cpp b/llvm/lib/Support/Mutex.cpp
new file mode 100644
index 00000000000..6271797da47
--- /dev/null
+++ b/llvm/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 ();
+}
OpenPOWER on IntegriCloud