[llvm-commits] CVS: llvm/lib/System/Unix/Mutex.inc

Reid Spencer reid at x10sys.com
Tue Jul 12 08:37:55 PDT 2005



Changes in directory llvm/lib/System/Unix:

Mutex.inc added (r1.1)
---
Log message:

For PR540: http://llvm.cs.uiuc.edu/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.


---
Diffs of the changes:  (+46 -0)

 Mutex.inc |   46 ++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 46 insertions(+)


Index: llvm/lib/System/Unix/Mutex.inc
diff -c /dev/null llvm/lib/System/Unix/Mutex.inc:1.1
*** /dev/null	Tue Jul 12 10:37:53 2005
--- llvm/lib/System/Unix/Mutex.inc	Tue Jul 12 10:37:43 2005
***************
*** 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 )
+ {
+ }
+ 
+ }






More information about the llvm-commits mailing list