//===- llvm/Support/Mutex.h - Mutex Operating System Concept -----*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // // This file declares the llvm::sys::Mutex class. // //===----------------------------------------------------------------------===// #ifndef LLVM_SUPPORT_MUTEX_H #define LLVM_SUPPORT_MUTEX_H #include "llvm/Support/Threading.h" #include <cassert> #include <mutex> namespace llvm { namespace sys { /// SmartMutex - A mutex with a compile time constant parameter that /// indicates whether this mutex should become a no-op when we're not /// running in multithreaded mode. template<bool mt_only> class SmartMutex { … }; /// Mutex - A standard, always enforced mutex. Mutex; SmartScopedLock; ScopedLock; } } #endif