LLVM API Documentation
00001 //===-- llvm/Support/ThreadSupport-NoSupport.h - Generic Impl ---*- C++ -*-===// 00002 // 00003 // The LLVM Compiler Infrastructure 00004 // 00005 // This file was developed by the LLVM research group and is distributed under 00006 // the University of Illinois Open Source License. See LICENSE.TXT for details. 00007 // 00008 //===----------------------------------------------------------------------===// 00009 // 00010 // This file defines a generic ThreadSupport implementation used when there is 00011 // no supported threading mechanism on the current system. Users should never 00012 // #include this file directly! 00013 // 00014 //===----------------------------------------------------------------------===// 00015 00016 // Users should never #include this file directly! As such, no include guards 00017 // are needed. 00018 00019 #ifndef LLVM_SUPPORT_THREADSUPPORT_H 00020 #error "Code should not #include Support/ThreadSupport-NoSupport.h directly!" 00021 #endif 00022 00023 namespace llvm { 00024 /// Mutex - This class allows user code to protect variables shared between 00025 /// threads. It implements a "recursive" mutex, to simplify user code. 00026 /// 00027 /// Since there is no platform support for _creating threads_, the non-thread 00028 /// implementation of this class is a noop. 00029 /// 00030 struct Mutex { 00031 void acquire () {} 00032 void release () {} 00033 }; 00034 }