doompanning/include/spdlog/details/console_globals.h
oxmox 208a78cc23 Squashed 'external/spdlog/' content from commit ad0e89cb
git-subtree-dir: external/spdlog
git-subtree-split: ad0e89cbfb4d0c1ce4d097e134eb7be67baebb36
2023-02-03 22:02:26 +01:00

32 lines
609 B
C++

// Copyright(c) 2015-present, Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once
#include <spdlog/details/null_mutex.h>
#include <mutex>
namespace spdlog {
namespace details {
struct console_mutex
{
using mutex_t = std::mutex;
static mutex_t &mutex()
{
static mutex_t s_mutex;
return s_mutex;
}
};
struct console_nullmutex
{
using mutex_t = null_mutex;
static mutex_t &mutex()
{
static mutex_t s_mutex;
return s_mutex;
}
};
} // namespace details
} // namespace spdlog