diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2005-07-12 15:37:43 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2005-07-12 15:37:43 +0000 |
commit | b2164e5cb5086f0595e96fdbb5ffc614dea9c441 (patch) | |
tree | 1d75378c4ce6365fcaf202243766c4b400b809bd /lib/System/Win32 | |
parent | 22177fe580ef2e32cb2392408a00d8b6dfcaba6c (diff) | |
download | external_llvm-b2164e5cb5086f0595e96fdbb5ffc614dea9c441.zip external_llvm-b2164e5cb5086f0595e96fdbb5ffc614dea9c441.tar.gz external_llvm-b2164e5cb5086f0595e96fdbb5ffc614dea9c441.tar.bz2 |
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/Win32')
-rw-r--r-- | lib/System/Win32/Mutex.inc | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/lib/System/Win32/Mutex.inc b/lib/System/Win32/Mutex.inc new file mode 100644 index 0000000..d6acb23 --- /dev/null +++ b/lib/System/Win32/Mutex.inc @@ -0,0 +1,46 @@ +//===- llvm/System/Win32/Mutex.inc - Win32 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 Win32 specific (non-pthread) Mutex class. +// +//===----------------------------------------------------------------------===// + +//===----------------------------------------------------------------------===// +//=== WARNING: Implementation here must contain only generic Win32 code that +//=== is guaranteed to work on *all* Win32 variants. +//===----------------------------------------------------------------------===// + +namespace llvm +{ +using namespace sys; + +Mutex::Mutex( bool recursive) +{ +} + +Mutex::~Mutex() +{ +} + +bool +Mutex::acquire() +{ +} + +bool +Mutex::release() +{ +} + +bool +Mutex::tryacquire( void ) +{ +} + +} |