#include "zeroerr/internal/config.h"
#include <atomic>
#include <mutex>
Go to the source code of this file.
|
| #define | ZEROERR_MUTEX(x) static std::mutex x; |
| | Thread safety support This header provides thread-safe support for zeroerr.
|
| |
| #define | ZEROERR_LOCK(x) std::lock_guard<std::mutex> lock(x); |
| |
| #define | ZEROERR_ATOMIC(x) std::atomic<x> |
| |
| #define | ZEROERR_LOAD(x) x.load() |
| |
◆ ZEROERR_ATOMIC
| #define ZEROERR_ATOMIC |
( |
|
x | ) |
std::atomic<x> |
◆ ZEROERR_LOAD
| #define ZEROERR_LOAD |
( |
|
x | ) |
x.load() |
◆ ZEROERR_LOCK
| #define ZEROERR_LOCK |
( |
|
x | ) |
std::lock_guard<std::mutex> lock(x); |
◆ ZEROERR_MUTEX
| #define ZEROERR_MUTEX |
( |
|
x | ) |
static std::mutex x; |
Thread safety support This header provides thread-safe support for zeroerr.
It defines macros for mutexes, locks, and atomic operations. The macros are conditionally defined based on the ZEROERR_NO_THREAD_SAFE flag.