Be a bit more efficient when processing the active and inactive
[oota-llvm.git] / include / llvm / Support / ThreadSupport-NoSupport.h
1 //===-- Support/ThreadSupport-NoSupport.h - Generic impl --------*- C++ -*-===//
2 // 
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file was developed by the LLVM research group and is distributed under
6 // the University of Illinois Open Source License. See LICENSE.TXT for details.
7 // 
8 //===----------------------------------------------------------------------===//
9 //
10 // This file defines a generic ThreadSupport implementation used when there is
11 // no supported threading mechanism on the current system.  Users should never
12 // #include this file directly!
13 //
14 //===----------------------------------------------------------------------===//
15
16 // Users should never #include this file directly!  As such, no include guards
17 // are needed.
18
19 #ifndef SUPPORT_THREADSUPPORT_H
20 #error "Code should not #include Support/ThreadSupport-NoSupport.h directly!"
21 #endif
22
23 namespace llvm {
24   /// Mutex - This class allows user code to protect variables shared between
25   /// threads.  It implements a "recursive" mutex, to simplify user code.
26   ///
27   /// Since there is no platform support for _creating threads_, the non-thread
28   /// implementation of this class is a noop.
29   ///
30   struct Mutex {
31     void acquire () {}
32     void release () {}
33   };
34 }