mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-07-03 15:46:20 +00:00
kernel: Multiplatform thread implementation
This commit is contained in:
parent
8c5b3f5f38
commit
c9063a644e
8 changed files with 84 additions and 15 deletions
26
src/core/thread.h
Normal file
26
src/core/thread.h
Normal file
|
@ -0,0 +1,26 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
namespace Core {
|
||||
|
||||
class Thread {
|
||||
public:
|
||||
using ThreadFunc = void (*)(void*);
|
||||
|
||||
Thread();
|
||||
~Thread();
|
||||
|
||||
int Create(ThreadFunc func, void* arg);
|
||||
void Exit();
|
||||
|
||||
void* GetHandle() {
|
||||
return native_handle;
|
||||
}
|
||||
|
||||
private:
|
||||
void* native_handle;
|
||||
};
|
||||
|
||||
} // namespace Core
|
Loading…
Add table
Add a link
Reference in a new issue