mirror of
https://github.com/LMMS/lmms.git
synced 2026-01-02 11:38:05 -05:00
19 lines
399 B
C++
19 lines
399 B
C++
#pragma once
|
|
|
|
#include <thread>
|
|
|
|
#include "NiftyCounter.h"
|
|
|
|
namespace lmms::_cdslib
|
|
{
|
|
void init();
|
|
void deinit();
|
|
void thread_init();
|
|
void thread_deinit();
|
|
|
|
static NiftyCounter<init, deinit> _counter;
|
|
static thread_local NiftyCounterTL<_cdslib::thread_init, _cdslib::thread_deinit> _thread_counter;
|
|
} // namespace lmms:_cdslib
|
|
|
|
#define CDS_THREAD_GUARD() (void)lmms::_cdslib::_thread_counter;
|