Adding support for windows and fixing some errors
This commit is contained in:
parent
7660d58f26
commit
420bb37039
84 changed files with 168 additions and 255 deletions
|
|
@ -1,16 +1,16 @@
|
|||
#pragma once
|
||||
|
||||
#include <pthread.h>
|
||||
#include <mutex>
|
||||
|
||||
namespace tp {
|
||||
class Mutex {
|
||||
pthread_mutex_t mMutex{};
|
||||
std::mutex mMutex;
|
||||
|
||||
public:
|
||||
Mutex() = default;
|
||||
|
||||
void lock() { pthread_mutex_lock(&mMutex); }
|
||||
void lock() { mMutex.lock(); }
|
||||
|
||||
void unlock() { pthread_mutex_unlock(&mMutex); }
|
||||
void unlock() { mMutex.unlock(); }
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue