Adding support for windows and fixing some errors

This commit is contained in:
Ilusha 2024-01-15 16:35:16 -08:00 committed by IlyaShurupov
parent 2722a25036
commit 34a8d4eafd
84 changed files with 168 additions and 255 deletions

View file

@ -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(); }
};
}
}