mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-07-14 13:45:59 +00:00
kernel: Rewrite pthread emulation (#1440)
* libkernel: Cleanup some function places * kernel: Refactor thread functions * kernel: It builds * kernel: Fix a bunch of bugs, kernel thread heap * kernel: File cleanup pt1 * File cleanup pt2 * File cleanup pt3 * File cleanup pt4 * kernel: Add missing funcs * kernel: Add basic exceptions for linux * gnmdriver: Add workload functions * kernel: Fix new pthreads code on macOS. (#1441) * kernel: Downgrade edeadlk to log * gnmdriver: Add sceGnmSubmitCommandBuffersForWorkload * exception: Add context register population for macOS. (#1444) * kernel: Pthread rewrite touchups for Windows * kernel: Multiplatform thread implementation * mutex: Remove spamming log * pthread_spec: Make assert into a log * pthread_spec: Zero initialize array * Attempt to fix non-Windows builds * hotfix: change incorrect NID for scePthreadAttrSetaffinity * scePthreadAttrSetaffinity implementation * Attempt to fix Linux * windows: Address a bunch of address space problems * address_space: Fix unmap of region surrounded by placeholders * libs: Reduce logging * pthread: Implement condvar with waitable atomics and sleepqueue * sleepq: Separate and make faster * time: Remove delay execution * Causes high cpu usage in Tohou Luna Nights * kernel: Cleanup files again * pthread: Add missing include * semaphore: Use binary_semaphore instead of condvar * Seems more reliable * libraries/sysmodule: log module on `sceSysmoduleIsLoaded` * libraries/kernel: implement `scePthreadSetPrio` --------- Co-authored-by: squidbus <175574877+squidbus@users.noreply.github.com> Co-authored-by: Daniel R. <47796739+polybiusproxy@users.noreply.github.com>
This commit is contained in:
parent
6904764aab
commit
c4506da0ae
104 changed files with 5554 additions and 3979 deletions
|
@ -4,7 +4,7 @@
|
|||
#pragma once
|
||||
|
||||
#include "common/types.h"
|
||||
#include "core/libraries/kernel/event_queues.h"
|
||||
#include "core/libraries/kernel/equeue.h"
|
||||
|
||||
namespace Core::Loader {
|
||||
class SymbolsResolver;
|
||||
|
@ -16,11 +16,11 @@ using namespace Kernel;
|
|||
|
||||
s32 PS4_SYSV_ABI sceGnmAddEqEvent(SceKernelEqueue eq, u64 id, void* udata);
|
||||
int PS4_SYSV_ABI sceGnmAreSubmitsAllowed();
|
||||
int PS4_SYSV_ABI sceGnmBeginWorkload();
|
||||
int PS4_SYSV_ABI sceGnmBeginWorkload(u32 workload_stream, u64* workload);
|
||||
s32 PS4_SYSV_ABI sceGnmComputeWaitOnAddress(u32* cmdbuf, u32 size, uintptr_t addr, u32 mask,
|
||||
u32 cmp_func, u32 ref);
|
||||
int PS4_SYSV_ABI sceGnmComputeWaitSemaphore();
|
||||
int PS4_SYSV_ABI sceGnmCreateWorkloadStream();
|
||||
int PS4_SYSV_ABI sceGnmCreateWorkloadStream(u64 param1, u32* workload_stream);
|
||||
int PS4_SYSV_ABI sceGnmDebuggerGetAddressWatch();
|
||||
int PS4_SYSV_ABI sceGnmDebuggerHaltWavefront();
|
||||
int PS4_SYSV_ABI sceGnmDebuggerReadGds();
|
||||
|
@ -77,7 +77,7 @@ int PS4_SYSV_ABI sceGnmDriverInternalRetrieveGnmInterfaceForValidation();
|
|||
int PS4_SYSV_ABI sceGnmDriverInternalVirtualQuery();
|
||||
int PS4_SYSV_ABI sceGnmDriverTraceInProgress();
|
||||
int PS4_SYSV_ABI sceGnmDriverTriggerCapture();
|
||||
int PS4_SYSV_ABI sceGnmEndWorkload();
|
||||
int PS4_SYSV_ABI sceGnmEndWorkload(u64 workload);
|
||||
s32 PS4_SYSV_ABI sceGnmFindResourcesPublic();
|
||||
void PS4_SYSV_ABI sceGnmFlushGarlic();
|
||||
int PS4_SYSV_ABI sceGnmGetCoredumpAddress();
|
||||
|
@ -210,11 +210,17 @@ s32 PS4_SYSV_ABI sceGnmSubmitAndFlipCommandBuffers(u32 count, u32* dcb_gpu_addrs
|
|||
u32* dcb_sizes_in_bytes, u32* ccb_gpu_addrs[],
|
||||
u32* ccb_sizes_in_bytes, u32 vo_handle,
|
||||
u32 buf_idx, u32 flip_mode, u32 flip_arg);
|
||||
int PS4_SYSV_ABI sceGnmSubmitAndFlipCommandBuffersForWorkload();
|
||||
int PS4_SYSV_ABI sceGnmSubmitAndFlipCommandBuffersForWorkload(
|
||||
u32 workload, u32 count, u32* dcb_gpu_addrs[], u32* dcb_sizes_in_bytes, u32* ccb_gpu_addrs[],
|
||||
u32* ccb_sizes_in_bytes, u32 vo_handle, u32 buf_idx, u32 flip_mode, u32 flip_arg);
|
||||
s32 PS4_SYSV_ABI sceGnmSubmitCommandBuffers(u32 count, const u32* dcb_gpu_addrs[],
|
||||
u32* dcb_sizes_in_bytes, const u32* ccb_gpu_addrs[],
|
||||
u32* ccb_sizes_in_bytes);
|
||||
int PS4_SYSV_ABI sceGnmSubmitCommandBuffersForWorkload();
|
||||
int PS4_SYSV_ABI sceGnmSubmitCommandBuffersForWorkload(u32 workload, u32 count,
|
||||
const u32* dcb_gpu_addrs[],
|
||||
u32* dcb_sizes_in_bytes,
|
||||
const u32* ccb_gpu_addrs[],
|
||||
u32* ccb_sizes_in_bytes);
|
||||
int PS4_SYSV_ABI sceGnmSubmitDone();
|
||||
int PS4_SYSV_ABI sceGnmUnmapComputeQueue();
|
||||
int PS4_SYSV_ABI sceGnmUnregisterAllResourcesForOwner();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue