Remove mutex class and use std
This commit is contained in:
parent
b26310439d
commit
0b63045503
5 changed files with 5 additions and 22 deletions
|
|
@ -27,7 +27,7 @@ ualni HeapAllocGlobal::getNAllocations() { return 0; }
|
|||
|
||||
tp::MemHead* tp::HeapAllocGlobal::mEntry = nullptr;
|
||||
tp::ualni tp::HeapAllocGlobal::mNumAllocations = 0;
|
||||
tp::Mutex tp::HeapAllocGlobal::mMutex;
|
||||
std::mutex tp::HeapAllocGlobal::mMutex;
|
||||
bool tp::HeapAllocGlobal::mIgnore = true;
|
||||
|
||||
// ----------------------- Debug Implementation ---------------------------- //
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include "Module.hpp"
|
||||
#include "Multithreading.hpp"
|
||||
#include <mutex>
|
||||
|
||||
namespace tp {
|
||||
|
||||
|
|
@ -10,7 +10,7 @@ namespace tp {
|
|||
#ifdef MEM_DEBUG
|
||||
static ualni mNumAllocations;
|
||||
static struct MemHead* mEntry;
|
||||
static Mutex mMutex;
|
||||
static std::mutex mMutex;
|
||||
static bool mIgnore;
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
option(MODULES_MEMORY_DEBUG "Debug memory" OFF)
|
||||
option(MODULES_MEMORY_DEBUG "Debug memory" ON)
|
||||
|
||||
if (MODULES_MEMORY_DEBUG)
|
||||
add_compile_definitions(MEM_DEBUG)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
#include "Player.hpp"
|
||||
#include "Buffer.hpp"
|
||||
#include "Multithreading.hpp"
|
||||
|
||||
#include "portaudio.h"
|
||||
|
||||
|
|
@ -125,7 +124,7 @@ private:
|
|||
private:
|
||||
bool mInitializationStatus = false;
|
||||
PaStream* mPaStream = nullptr;
|
||||
tp::Mutex mMutex;
|
||||
std::mutex mMutex;
|
||||
|
||||
const tp::halnf* mBuffer = nullptr;
|
||||
const tp::ualni* mPointerMax = nullptr;
|
||||
|
|
|
|||
|
|
@ -1,16 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include <mutex>
|
||||
|
||||
namespace tp {
|
||||
class Mutex {
|
||||
std::mutex mMutex;
|
||||
|
||||
public:
|
||||
Mutex() = default;
|
||||
|
||||
void lock() { mMutex.lock(); }
|
||||
|
||||
void unlock() { mMutex.unlock(); }
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue