summaryrefslogtreecommitdiffstats
path: root/llvm/lib/System/Unix/Mutex.inc
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2005-07-12 15:37:43 +0000
committerReid Spencer <rspencer@reidspencer.com>2005-07-12 15:37:43 +0000
commitf404981bf2d324b2e04a0b6d4b81bd28a55c0ab6 (patch)
tree06abd46dea9bfe06ae30dde24e69cf972c98c1c6 /llvm/lib/System/Unix/Mutex.inc
parent1aa7d05f3c7bb63ba3e4c0fa0f5a60797c33b320 (diff)
downloadbcm5719-llvm-f404981bf2d324b2e04a0b6d4b81bd28a55c0ab6.tar.gz
bcm5719-llvm-f404981bf2d324b2e04a0b6d4b81bd28a55c0ab6.zip
For PR540:
Add a Mutex class for thread synchronization in a platform-independent way. The current implementation only supports pthreads. Win32 use of Critical Sections will be added later. The design permits other threading models to be used if (and only if) pthreads is not available. llvm-svn: 22403
Diffstat (limited to 'llvm/lib/System/Unix/Mutex.inc')
-rw-r--r--llvm/lib/System/Unix/Mutex.inc46
1 files changed, 46 insertions, 0 deletions
diff --git a/llvm/lib/System/Unix/Mutex.inc b/llvm/lib/System/Unix/Mutex.inc
new file mode 100644
index 00000000000..fa218dbb53c
--- /dev/null
+++ b/llvm/lib/System/Unix/Mutex.inc
@@ -0,0 +1,46 @@
+//===- llvm/System/Unix/Mutex.inc - Unix Mutex Implementation ---*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file was developed by Reid Spencer and is distributed under the
+// University of Illinois Open Source License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file implements the Unix specific (non-pthread) Mutex class.
+//
+//===----------------------------------------------------------------------===//
+
+//===----------------------------------------------------------------------===//
+//=== WARNING: Implementation here must contain only generic UNIX code that
+//=== is guaranteed to work on *all* UNIX variants.
+//===----------------------------------------------------------------------===//
+
+namespace llvm
+{
+using namespace sys;
+
+Mutex::Mutex( bool recursive)
+{
+}
+
+Mutex::~Mutex()
+{
+}
+
+bool
+Mutex::acquire()
+{
+}
+
+bool
+Mutex::release()
+{
+}
+
+bool
+Mutex::tryacquire( void )
+{
+}
+
+}
OpenPOWER on IntegriCloud