mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-12-16 08:38:43 +00:00
The way to Unity, pt.1 (#1659)
This commit is contained in:
@@ -11,27 +11,34 @@ struct PthreadAttr;
|
||||
|
||||
namespace Core {
|
||||
|
||||
class Thread {
|
||||
public:
|
||||
using ThreadFunc = void (*)(void*);
|
||||
using PthreadFunc = void* (*)(void*);
|
||||
using ThreadFunc = void (*)(void*);
|
||||
using PthreadFunc = void* (*)(void*);
|
||||
|
||||
Thread();
|
||||
~Thread();
|
||||
class NativeThread {
|
||||
public:
|
||||
NativeThread();
|
||||
~NativeThread();
|
||||
|
||||
int Create(ThreadFunc func, void* arg, const ::Libraries::Kernel::PthreadAttr* attr);
|
||||
void Exit();
|
||||
|
||||
void Initialize();
|
||||
|
||||
uintptr_t GetHandle() {
|
||||
return reinterpret_cast<uintptr_t>(native_handle);
|
||||
}
|
||||
|
||||
u64 GetTid() {
|
||||
return tid;
|
||||
}
|
||||
|
||||
private:
|
||||
#if _WIN64
|
||||
#ifdef _WIN64
|
||||
void* native_handle;
|
||||
#else
|
||||
uintptr_t native_handle;
|
||||
#endif
|
||||
u64 tid;
|
||||
};
|
||||
|
||||
} // namespace Core
|
||||
Reference in New Issue
Block a user