1// Copyright(c) 2015-present, Gabi Melman & spdlog contributors.
2// Distributed under the MIT License (http://opensource.org/licenses/MIT)
3
4#pragma once
5
6#include <mutex>
7#include <spdlog/details/null_mutex.h>
8
9namespace spdlog {
10namespace details {
11
12struct console_mutex {
13 using mutex_t = std::mutex;
14 static mutex_t &mutex() {
15 static mutex_t s_mutex;
16 return s_mutex;
17 }
18};
19
20struct console_nullmutex {
21 using mutex_t = null_mutex;
22 static mutex_t &mutex() {
23 static mutex_t s_mutex;
24 return s_mutex;
25 }
26};
27} // namespace details
28} // namespace spdlog
29