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 <spdlog/details/null_mutex.h>
7#include <mutex>
8
9namespace spdlog {
10namespace details {
11
12struct console_mutex
13{
14 using mutex_t = std::mutex;
15 static mutex_t &mutex()
16 {
17 static mutex_t s_mutex;
18 return s_mutex;
19 }
20};
21
22struct console_nullmutex
23{
24 using mutex_t = null_mutex;
25 static mutex_t &mutex()
26 {
27 static mutex_t s_mutex;
28 return s_mutex;
29 }
30};
31} // namespace details
32} // namespace spdlog
33