mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-06-26 12:26:18 +00:00
The way to Unity, pt.1 (#1659)
This commit is contained in:
parent
2380f2f9c9
commit
98f0cb65d7
8 changed files with 564 additions and 29 deletions
|
@ -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
|
Loading…
Add table
Add a link
Reference in a new issue