6#pragma push_macro("_LIBCPP_REMOVE_TRANSITIVE_INCLUDES")
7#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
8#define _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
20#ifdef ZEROERR_NO_THREAD_SAFE
22#define ZEROERR_MUTEX(x)
23#define ZEROERR_LOCK(x)
24#define ZEROERR_ATOMIC(x) x
25#define ZEROERR_LOAD(x) x
29#define ZEROERR_MUTEX(x) static zeroerr::detail::Mutex x;
30#define ZEROERR_LOCK(x) zeroerr::detail::LockGuard lock(x);
31#define ZEROERR_ATOMIC(x) std::atomic<x>
32#define ZEROERR_LOAD(x) x.load()
35namespace zeroerr {
namespace detail {
48private:
Mutex& mutex_;
55#pragma pop_macro("_LIBCPP_REMOVE_TRANSITIVE_INCLUDES")
Definition threadsafe.h:44
LockGuard(Mutex &mutex)
Definition threadsafe.h:45
LockGuard(const LockGuard &)=delete
~LockGuard()
Definition threadsafe.h:46
Definition threadsafe.h:36
void unlock()
Definition threadsafe.cpp:9
void lock()
Definition threadsafe.cpp:8
Mutex(const Mutex &)=delete
Mutex & operator=(const Mutex &)=delete
Mutex()
Definition threadsafe.cpp:6
~Mutex()
Definition threadsafe.cpp:7
Definition assert_text.cpp:5