summaryrefslogtreecommitdiff
path: root/lib/System/Unix
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
commitb2164e5cb5086f0595e96fdbb5ffc614dea9c441 (patch)
tree1d75378c4ce6365fcaf202243766c4b400b809bd /lib/System/Unix
parent22177fe580ef2e32cb2392408a00d8b6dfcaba6c (diff)
downloadllvm-b2164e5cb5086f0595e96fdbb5ffc614dea9c441.tar.gz
llvm-b2164e5cb5086f0595e96fdbb5ffc614dea9c441.tar.bz2
llvm-b2164e5cb5086f0595e96fdbb5ffc614dea9c441.tar.xz
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22403 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/System/Unix')
-rw-r--r--lib/System/Unix/Mutex.inc46
1 files changed, 46 insertions, 0 deletions
diff --git a/lib/System/Unix/Mutex.inc b/lib/System/Unix/Mutex.inc
new file mode 100644
index 0000000000..fa218dbb53
--- /dev/null
+++ b/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 )
+{
+}
+
+}