diff --git a/core/libs/prx/libkernel/Aio/src/Aio.cpp b/core/libs/prx/libkernel/Aio/src/Aio.cpp new file mode 100644 index 000000000..d5b2b98b3 --- /dev/null +++ b/core/libs/prx/libkernel/Aio/src/Aio.cpp @@ -0,0 +1,53 @@ +#include +#include +#include "SceTypes.hpp" +#include "prx/libc/include/General.hpp" + +extern "C" { + +int APS5_VABI sceKernelAioDeleteRequest(int32_t id, int32_t* ret) { + (void)id; + (void)ret; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI sceKernelAioInitializeImpl(void* param, int32_t size) { + (void)param; + (void)size; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +void APS5_VABI sceKernelAioInitializeParam(void* param) { + (void)param; + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceKernelAioSubmitReadCommands(KernelAioRwRequest* req, int32_t size, int32_t prio, int32_t* id) { + (void)req; + (void)size; + (void)prio; + (void)id; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI sceKernelAioSubmitWriteCommands(KernelAioRwRequest* req, int32_t size, int32_t prio, int32_t* id) { + (void)req; + (void)size; + (void)prio; + (void)id; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI sceKernelAioWaitRequest(int32_t id, int32_t* state, uint32_t* usec) { + (void)id; + (void)state; + (void)usec; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +} diff --git a/core/libs/prx/libkernel/CMakeLists.txt b/core/libs/prx/libkernel/CMakeLists.txt index 10e83b40a..a43e956a1 100644 --- a/core/libs/prx/libkernel/CMakeLists.txt +++ b/core/libs/prx/libkernel/CMakeLists.txt @@ -1,12 +1,14 @@ add_library(libkernel SHARED EXCLUDE_FROM_ALL - ${CMAKE_CURRENT_SOURCE_DIR}/Export.cpp ${CMAKE_CURRENT_SOURCE_DIR}/Equeue/Equeue.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/Equeue/src/EventAccessors.cpp ${CMAKE_CURRENT_SOURCE_DIR}/File/src/NativeStat.cpp ${CMAKE_CURRENT_SOURCE_DIR}/File/src/Open.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/File/src/Stdio.cpp ${CMAKE_CURRENT_SOURCE_DIR}/Semaphore/src/Semaphore.cpp ${CMAKE_CURRENT_SOURCE_DIR}/DirectMemory/Export.cpp ${CMAKE_CURRENT_SOURCE_DIR}/DirectMemory/DirectMemory.cpp ${CMAKE_CURRENT_SOURCE_DIR}/DirectMemory/MemoryPool.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/DirectMemory/MemoryPoolExport.cpp ${CMAKE_CURRENT_SOURCE_DIR}/Pthread/src/Mutex.cpp ${CMAKE_CURRENT_SOURCE_DIR}/Pthread/src/Cond.cpp ${CMAKE_CURRENT_SOURCE_DIR}/Pthread/src/Attr.cpp @@ -14,6 +16,22 @@ add_library(libkernel SHARED EXCLUDE_FROM_ALL ${CMAKE_CURRENT_SOURCE_DIR}/Pthread/src/Tsd.cpp ${CMAKE_CURRENT_SOURCE_DIR}/Pthread/src/Rwlock.cpp ${CMAKE_CURRENT_SOURCE_DIR}/Pthread/src/Sem.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/Pthread/Posix/Attr.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/Pthread/Posix/Cond.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/Pthread/Posix/Mutex.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/Pthread/Posix/Rwlock.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/Pthread/Posix/Thread.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/Pthread/Posix/Tsd.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/Pthread/Posix/Sem.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/Socket/src/Socket.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/EventFlag/src/EventFlag.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/Module/src/Module.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/Aio/src/Aio.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/System/src/Coredump.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/System/src/Exception.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/System/src/Sanitizer.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/System/src/Rtld.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/System/src/Process.cpp ${CMAKE_CURRENT_SOURCE_DIR}/Time/Time.cpp ) diff --git a/core/libs/prx/libkernel/DirectMemory/Export.cpp b/core/libs/prx/libkernel/DirectMemory/Export.cpp index 61c1769b9..0ef1a9b98 100644 --- a/core/libs/prx/libkernel/DirectMemory/Export.cpp +++ b/core/libs/prx/libkernel/DirectMemory/Export.cpp @@ -102,4 +102,103 @@ int APS5_VABI sceKernelVirtualQuery(const void* addr, int flags, VirtualQueryInf return 0; } +// --------------------------------------------------------------------------- +// Moved as-is (not yet implemented) from the monolithic libkernel/Export.cpp. +// --------------------------------------------------------------------------- + +int APS5_VABI sceKernelCheckedReleaseDirectMemory(int64_t start, size_t len) { + (void)start; + (void)len; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI sceKernelMtypeprotect(const void* addr, size_t len, int type, int prot) { + (void)addr; + (void)len; + (void)type; + (void)prot; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI sceKernelQueryMemoryProtection(void* addr, void** start, void** end, int* prot) { + (void)addr; + (void)start; + (void)end; + (void)prot; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI sceKernelIsStack(void* addr, void** start, void** end) { + (void)addr; + (void)start; + (void)end; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI sceKernelAvailableFlexibleMemorySize(size_t* size) { + (void)size; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI sceKernelConfiguredFlexibleMemorySize(size_t* size) { + (void)size; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI sceKernelSetVirtualRangeName(const void* addr, uint64_t len, const char* name) { + (void)addr; + (void)len; + (void)name; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI sceKernelGetPageTableStats(int* cpu_total, int* cpu_available, int* gpu_total, int* gpu_available) { + (void)cpu_total; + (void)cpu_available; + (void)gpu_total; + (void)gpu_available; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI sceKernelGetPrtAperture(int index, void** addr, size_t* len) { + (void)index; + (void)addr; + (void)len; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI sceKernelSetPrtAperture(int index, void* addr, size_t len) { + (void)index; + (void)addr; + (void)len; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI sceKernelBatchMap(KernelBatchMapEntry* entries, int num_entries, int* num_entries_out) { + (void)entries; + (void)num_entries; + (void)num_entries_out; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI sceKernelBatchMap2(KernelBatchMapEntry* entries, int num_entries, int* num_entries_out, int flags) { + (void)entries; + (void)num_entries; + (void)num_entries_out; + (void)flags; + NotImplemented_nid_no_patch(__func__); + return 0; +} + } diff --git a/core/libs/prx/libkernel/DirectMemory/MemoryPoolExport.cpp b/core/libs/prx/libkernel/DirectMemory/MemoryPoolExport.cpp new file mode 100644 index 000000000..8922abc29 --- /dev/null +++ b/core/libs/prx/libkernel/DirectMemory/MemoryPoolExport.cpp @@ -0,0 +1,62 @@ +#include +#include +#include "SceTypes.hpp" +#include "prx/libc/include/General.hpp" + +extern "C" { + +int APS5_VABI sceKernelMemoryPoolBatch(const KernelMemoryPoolBatchEntry* entries, int num_entries, int* num_entries_out, int flags) { + (void)entries; + (void)num_entries; + (void)num_entries_out; + (void)flags; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI sceKernelMemoryPoolCommit(void* addr, size_t len, int type, int prot, int flags) { + (void)addr; + (void)len; + (void)type; + (void)prot; + (void)flags; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI sceKernelMemoryPoolDecommit(void* addr, size_t len, int flags) { + (void)addr; + (void)len; + (void)flags; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI sceKernelMemoryPoolExpand(int64_t search_start, int64_t search_end, size_t len, size_t alignment, int64_t* phys_addr_out) { + (void)search_start; + (void)search_end; + (void)len; + (void)alignment; + (void)phys_addr_out; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI sceKernelMemoryPoolGetBlockStats(KernelMemoryPoolBlockStats* output, size_t output_size) { + (void)output; + (void)output_size; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI sceKernelMemoryPoolReserve(void* addr_in, size_t len, size_t alignment, int flags, void** addr_out) { + (void)addr_in; + (void)len; + (void)alignment; + (void)flags; + (void)addr_out; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +} diff --git a/core/libs/prx/libkernel/Equeue/src/EventAccessors.cpp b/core/libs/prx/libkernel/Equeue/src/EventAccessors.cpp new file mode 100644 index 000000000..ad02f49a3 --- /dev/null +++ b/core/libs/prx/libkernel/Equeue/src/EventAccessors.cpp @@ -0,0 +1,44 @@ +#include +#include +#include "SceTypes.hpp" +#include "prx/libc/include/General.hpp" + +extern "C" { + +intptr_t APS5_VABI sceKernelGetEventData(const KernelEvent* ev) { + (void)ev; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI sceKernelGetEventError(const KernelEvent* ev) { + (void)ev; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +intptr_t APS5_VABI sceKernelGetEventFflags(const KernelEvent* ev) { + (void)ev; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI sceKernelGetEventFilter(const KernelEvent* ev) { + (void)ev; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +uintptr_t APS5_VABI sceKernelGetEventId(const KernelEvent* ev) { + (void)ev; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +void* APS5_VABI sceKernelGetEventUserData(const KernelEvent* ev) { + (void)ev; + NotImplemented_nid_no_patch(__func__); + return nullptr; +} + +} diff --git a/core/libs/prx/libkernel/EventFlag/src/EventFlag.cpp b/core/libs/prx/libkernel/EventFlag/src/EventFlag.cpp new file mode 100644 index 000000000..a08cca7ab --- /dev/null +++ b/core/libs/prx/libkernel/EventFlag/src/EventFlag.cpp @@ -0,0 +1,65 @@ +#include +#include +#include "SceTypes.hpp" +#include "prx/libc/include/General.hpp" + +extern "C" { + +int APS5_VABI sceKernelCreateEventFlag(KernelEventFlag* ef, const char* name, uint32_t attr, uint64_t init_pattern, const void* param) { + (void)ef; + (void)name; + (void)attr; + (void)init_pattern; + (void)param; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI sceKernelDeleteEventFlag(KernelEventFlag ef) { + (void)ef; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI sceKernelSetEventFlag(KernelEventFlag ef, uint64_t bit_pattern) { + (void)ef; + (void)bit_pattern; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI sceKernelClearEventFlag(KernelEventFlag ef, uint64_t bit_pattern) { + (void)ef; + (void)bit_pattern; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI sceKernelCancelEventFlag(KernelEventFlag ef, uint64_t set_pattern, int* num_wait_threads) { + (void)ef; + (void)set_pattern; + (void)num_wait_threads; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI sceKernelPollEventFlag(KernelEventFlag ef, uint64_t bit_pattern, uint32_t wait_mode, uint64_t* result_pat) { + (void)ef; + (void)bit_pattern; + (void)wait_mode; + (void)result_pat; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI sceKernelWaitEventFlag(KernelEventFlag ef, uint64_t bit_pattern, uint32_t wait_mode, uint64_t* result_pat, KernelUseconds* timeout) { + (void)ef; + (void)bit_pattern; + (void)wait_mode; + (void)result_pat; + (void)timeout; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +} diff --git a/core/libs/prx/libkernel/Export.cpp b/core/libs/prx/libkernel/Export.cpp deleted file mode 100644 index 1b6db2dc4..000000000 --- a/core/libs/prx/libkernel/Export.cpp +++ /dev/null @@ -1,1311 +0,0 @@ -#include -#include -#include -#include "SceTypes.hpp" -#include "prx/libc/include/General.hpp" -#include "DirectMemory/DirectMemory.hpp" -#include "Equeue/Equeue.hpp" -#include "prx/libkernel/File/include/File.hpp" -#include "prx/libkernel/Semaphore/include/Semaphore.hpp" -#include "prx/libkernel/Time/include/Time.hpp" - -extern "C" { - -int APS5_VABI accept_nid_postfix(int s, void* addr, uint32_t* addrlen) { - (void)s; - (void)addr; - (void)addrlen; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI bind_nid_postfix(int s, const void* addr, uint32_t addrlen) { - (void)s; - (void)addr; - (void)addrlen; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI chmod_nid_postfix(const char* path, int mode) { - (void)path; - (void)mode; - NotImplemented_nid_no_patch(__func__); - return 0; -} - - -int APS5_VABI close_nid_postfix(int d) { - (void)d; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI connect_nid_postfix(int s, const void* addr, uint32_t addrlen) { - (void)s; - (void)addr; - (void)addrlen; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -void APS5_VABI exit_nid_postfix(int code) { - (void)code; - NotImplemented_nid_no_patch(__func__); -} - -int APS5_VABI flock_nid_postfix(int d, int operation) { - (void)d; - (void)operation; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int64_t APS5_VABI fstat_nid_disambig1_nid_postfix(int d, FileStat* sb) { - (void)d; - (void)sb; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI ftruncate_nid_postfix(int d, int64_t length) { - (void)d; - (void)length; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI getargc_nid_postfix(void) { - NotImplemented_nid_no_patch(__func__); - return 0; -} - -const char** APS5_VABI getargv_nid_postfix(void) { - NotImplemented_nid_no_patch(__func__); - return nullptr; -} - -int APS5_VABI getpagesize_nid_postfix(void) { - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI getpid_nid_postfix(void) { - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI getsockname_nid_postfix(int s, void* addr, uint32_t* addrlen) { - (void)s; - (void)addr; - (void)addrlen; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI getsockopt_nid_postfix(int s, int level, int optname, void* optval, uint32_t* optlen) { - (void)s; - (void)level; - (void)optname; - (void)optval; - (void)optlen; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -const char* APS5_VABI inet_ntop_nid_postfix(int af, const void* src, char* dst, uint32_t size) { - (void)af; - (void)src; - (void)dst; - (void)size; - NotImplemented_nid_no_patch(__func__); - return nullptr; -} - -int APS5_VABI inet_pton_nid_postfix(int af, const char* src, void* dst) { - (void)af; - (void)src; - (void)dst; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI listen_nid_postfix(int s, int backlog) { - (void)s; - (void)backlog; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int64_t APS5_VABI lseek_nid_postfix(int d, int64_t offset, int whence) { - (void)d; - (void)offset; - (void)whence; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI mkdir_nid_postfix(const char* path, uint16_t mode) { - (void)path; - (void)mode; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI open_nid_postfix(const char* path, int flags, int mode) { - (void)path; - (void)flags; - (void)mode; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int64_t APS5_VABI pread_nid_disambig1_nid_postfix(int d, void* buf, size_t nbytes, int64_t offset) { - (void)d; - (void)buf; - (void)nbytes; - (void)offset; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI pthread_attr_destroy_nid_postfix(PthreadAttr* attr) { - (void)attr; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI pthread_attr_get_np_nid_postfix(Pthread thread, PthreadAttr* attr) { - (void)thread; - (void)attr; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI pthread_attr_getdetachstate_nid_postfix(const PthreadAttr* attr, int* state) { - (void)attr; - (void)state; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI pthread_attr_getguardsize_nid_postfix(const PthreadAttr* attr, size_t* guard_size) { - (void)attr; - (void)guard_size; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI pthread_attr_getschedparam_nid_postfix(const PthreadAttr* attr, KernelSchedParam* param) { - (void)attr; - (void)param; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI pthread_attr_getschedpolicy_nid_postfix(const PthreadAttr* attr, int* policy) { - (void)attr; - (void)policy; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI pthread_attr_getstack_nid_postfix(const PthreadAttr* __restrict attr, void** __restrict stack_addr, size_t* __restrict stack_size) { - (void)attr; - (void)stack_addr; - (void)stack_size; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI pthread_attr_getstacksize_nid_postfix(const PthreadAttr* attr, size_t* stack_size) { - (void)attr; - (void)stack_size; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI pthread_attr_init_nid_postfix(PthreadAttr* attr) { - (void)attr; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI pthread_attr_setdetachstate_nid_postfix(PthreadAttr* attr, int state) { - (void)attr; - (void)state; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI pthread_attr_setguardsize_nid_postfix(PthreadAttr* attr, size_t guard_size) { - (void)attr; - (void)guard_size; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI pthread_attr_setinheritsched_nid_postfix(PthreadAttr* attr, int inherit_sched) { - (void)attr; - (void)inherit_sched; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI pthread_attr_setschedparam_nid_postfix(PthreadAttr* attr, const KernelSchedParam* param) { - (void)attr; - (void)param; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI pthread_attr_setschedpolicy_nid_postfix(PthreadAttr* attr, int policy) { - (void)attr; - (void)policy; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI pthread_attr_setstacksize_nid_postfix(PthreadAttr* attr, size_t stack_size) { - (void)attr; - (void)stack_size; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI pthread_cond_broadcast_nid_postfix(PthreadCond* cond) { - (void)cond; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI pthread_cond_init_nid_postfix(PthreadCond* cond, const PthreadCondattr* attr) { - (void)cond; - (void)attr; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI pthread_cond_signal_nid_postfix(PthreadCond* cond) { - (void)cond; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI pthread_cond_timedwait_nid_postfix(PthreadCond* cond, PthreadMutex* mutex, const KernelTimespec* abstime) { - (void)cond; - (void)mutex; - (void)abstime; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI pthread_cond_wait_nid_postfix(PthreadCond* cond, PthreadMutex* mutex) { - (void)cond; - (void)mutex; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI pthread_condattr_destroy_nid_postfix(PthreadCondattr* attr) { - (void)attr; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI pthread_condattr_init_nid_postfix(PthreadCondattr* attr) { - (void)attr; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI pthread_condattr_setclock_nid_postfix(PthreadCondattr* attr, KernelClockid clock_id) { - (void)attr; - (void)clock_id; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI pthread_create_nid_postfix(Pthread* thread, const PthreadAttr* attr, pthread_entry_func_t entry, void* arg) { - (void)thread; - (void)attr; - (void)entry; - (void)arg; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI pthread_create_name_np_nid_postfix(Pthread* thread, const PthreadAttr* attr, pthread_entry_func_t entry, void* arg, const char* name) { - (void)thread; - (void)attr; - (void)entry; - (void)arg; - (void)name; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI pthread_detach_nid_postfix(Pthread thread) { - (void)thread; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -void APS5_VABI pthread_exit_nid_postfix(void* value) { - (void)value; - NotImplemented_nid_no_patch(__func__); -} - -int APS5_VABI pthread_getschedparam_nid_postfix(Pthread thread, int* policy, KernelSchedParam* param) { - (void)thread; - (void)policy; - (void)param; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -void* APS5_VABI pthread_getspecific_nid_postfix(PthreadKey key) { - (void)key; - NotImplemented_nid_no_patch(__func__); - return nullptr; -} - -int APS5_VABI pthread_join_nid_postfix(Pthread thread, void** value) { - (void)thread; - (void)value; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI pthread_key_create_nid_postfix(PthreadKey* key, pthread_key_destructor_func_t destructor) { - (void)key; - (void)destructor; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI pthread_key_delete_nid_postfix(PthreadKey key) { - (void)key; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI pthread_mutex_destroy_nid_postfix(PthreadMutex* mutex) { - (void)mutex; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI pthread_mutex_init_nid_postfix(PthreadMutex* mutex, const PthreadMutexattr* attr) { - (void)mutex; - (void)attr; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI pthread_mutex_lock_nid_postfix(PthreadMutex* mutex) { - (void)mutex; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI pthread_mutex_timedlock_nid_postfix(PthreadMutex* mutex, const KernelTimespec* abstime) { - (void)mutex; - (void)abstime; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI pthread_mutex_trylock_nid_postfix(PthreadMutex* mutex) { - (void)mutex; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI pthread_mutex_unlock_nid_postfix(PthreadMutex* mutex) { - (void)mutex; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI pthread_mutexattr_destroy_nid_postfix(PthreadMutexattr* attr) { - (void)attr; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI pthread_mutexattr_init_nid_postfix(PthreadMutexattr* attr) { - (void)attr; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI pthread_mutexattr_setprotocol_nid_postfix(PthreadMutexattr* attr, int protocol) { - (void)attr; - (void)protocol; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI pthread_mutexattr_settype_nid_postfix(PthreadMutexattr* attr, int type) { - (void)attr; - (void)type; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI pthread_once_nid_postfix(void* once_control, void (*init_routine)()) { - (void)once_control; - (void)init_routine; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI pthread_rename_np_nid_postfix(Pthread thread, const char* name) { - (void)thread; - (void)name; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI pthread_rwlock_destroy_nid_postfix(PthreadRwlock* rwlock) { - (void)rwlock; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI pthread_rwlock_init_nid_postfix(PthreadRwlock* rwlock, const PthreadRwlockattr* attr) { - (void)rwlock; - (void)attr; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI pthread_rwlock_wrlock_nid_postfix(PthreadRwlock* rwlock) { - (void)rwlock; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -Pthread APS5_VABI pthread_self_nid_postfix(void) { - NotImplemented_nid_no_patch(__func__); - return {}; -} - -int APS5_VABI pthread_setcancelstate_nid_postfix(int state, int* old_state) { - (void)state; - (void)old_state; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI pthread_setprio_nid_postfix(Pthread thread, int prio) { - (void)thread; - (void)prio; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI pthread_setschedparam_nid_postfix(Pthread thread, int policy, const KernelSchedParam* param) { - (void)thread; - (void)policy; - (void)param; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI pthread_setspecific_nid_postfix(PthreadKey key, void* value) { - (void)key; - (void)value; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -void APS5_VABI pthread_yield_nid_postfix(void) { - NotImplemented_nid_no_patch(__func__); -} - -int64_t APS5_VABI pwrite_nid_disambig1_nid_postfix(int d, const void* buf, size_t nbytes, int64_t offset) { - (void)d; - (void)buf; - (void)nbytes; - (void)offset; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int64_t APS5_VABI read_nid_postfix(int d, void* buf, uint64_t nbytes) { - (void)d; - (void)buf; - (void)nbytes; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int64_t APS5_VABI recv_nid_postfix(int s, void* buf, uint64_t len, int flags) { - (void)s; - (void)buf; - (void)len; - (void)flags; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int64_t APS5_VABI recvfrom_nid_postfix(int s, void* buf, uint64_t len, int flags, void* addr, uint32_t* addrlen) { - (void)s; - (void)buf; - (void)len; - (void)flags; - (void)addr; - (void)addrlen; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI sceCoredumpRegisterCoredumpHandler(uint64_t handler, size_t stack_size, uint64_t context) { - (void)handler; - (void)stack_size; - (void)context; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI sceCoredumpUnregisterCoredumpHandler(void) { - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI sceKernelAioDeleteRequest(int32_t id, int32_t* ret) { - (void)id; - (void)ret; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI sceKernelAioInitializeImpl(void* param, int32_t size) { - (void)param; - (void)size; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -void APS5_VABI sceKernelAioInitializeParam(void* param) { - (void)param; - NotImplemented_nid_no_patch(__func__); -} - -int APS5_VABI sceKernelAioSubmitReadCommands(KernelAioRwRequest* req, int32_t size, int32_t prio, int32_t* id) { - (void)req; - (void)size; - (void)prio; - (void)id; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI sceKernelAioSubmitWriteCommands(KernelAioRwRequest* req, int32_t size, int32_t prio, int32_t* id) { - (void)req; - (void)size; - (void)prio; - (void)id; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI sceKernelAioWaitRequest(int32_t id, int32_t* state, uint32_t* usec) { - (void)id; - (void)state; - (void)usec; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI sceKernelAvailableFlexibleMemorySize(size_t* size) { - (void)size; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI sceKernelBatchMap(KernelBatchMapEntry* entries, int num_entries, int* num_entries_out) { - (void)entries; - (void)num_entries; - (void)num_entries_out; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI sceKernelBatchMap2(KernelBatchMapEntry* entries, int num_entries, int* num_entries_out, int flags) { - (void)entries; - (void)num_entries; - (void)num_entries_out; - (void)flags; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI sceKernelCancelEventFlag(KernelEventFlag ef, uint64_t set_pattern, int* num_wait_threads) { - (void)ef; - (void)set_pattern; - (void)num_wait_threads; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI sceKernelCancelSema(KernelSema sem, int count, int* threads) { - (void)sem; - (void)count; - (void)threads; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI sceKernelCheckedReleaseDirectMemory(int64_t start, size_t len) { - (void)start; - (void)len; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI sceKernelCheckReachability(const char* path) { - (void)path; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI sceKernelClearEventFlag(KernelEventFlag ef, uint64_t bit_pattern) { - (void)ef; - (void)bit_pattern; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI sceKernelClockGetres(KernelClockid clock_id, KernelTimespec* tp) { - (void)clock_id; - (void)tp; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI sceKernelClockGettime(KernelClockid clock_id, KernelTimespec* tp) { - (void)clock_id; - (void)tp; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI sceKernelConfiguredFlexibleMemorySize(size_t* size) { - (void)size; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI sceKernelConvertLocaltimeToUtc(int64_t local_time, int64_t reserved, int64_t* utc_time, KernelTimezone* timezone, int32_t* dst_seconds) { - (void)local_time; - (void)reserved; - (void)utc_time; - (void)timezone; - (void)dst_seconds; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI sceKernelConvertUtcToLocaltime(int64_t utc_time, int64_t* local_time, KernelTimesec* st, uint64_t* dst_sec) { - (void)utc_time; - (void)local_time; - (void)st; - (void)dst_sec; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI sceKernelCreateEventFlag(KernelEventFlag* ef, const char* name, uint32_t attr, uint64_t init_pattern, const void* param) { - (void)ef; - (void)name; - (void)attr; - (void)init_pattern; - (void)param; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -void APS5_VABI sceKernelDebugRaiseException(int c1, int c2) { - (void)c1; - (void)c2; - NotImplemented_nid_no_patch(__func__); -} - -void APS5_VABI sceKernelDebugRaiseExceptionOnReleaseMode(int c1, int c2) { - (void)c1; - (void)c2; - NotImplemented_nid_no_patch(__func__); -} - -int APS5_VABI sceKernelDeleteEventFlag(KernelEventFlag ef) { - (void)ef; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI sceKernelDeleteSema(KernelSema sem) { - (void)sem; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI sceKernelDlsym(KernelModule handle, const char* symbol, void** addr) { - (void)handle; - (void)symbol; - (void)addr; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI sceKernelFstat(int d, FileStat* sb) { - (void)d; - (void)sb; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI sceKernelFsync(int fd) { - (void)fd; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI sceKernelGetCurrentCpu(void) { - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI sceKernelGetdents(int fd, char* buf, int nbytes) { - (void)fd; - (void)buf; - (void)nbytes; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI sceKernelGetdirentries(int fd, char* buf, int nbytes, int64_t* basep) { - (void)fd; - (void)buf; - (void)nbytes; - (void)basep; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -intptr_t APS5_VABI sceKernelGetEventData(const KernelEvent* ev) { - (void)ev; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI sceKernelGetEventError(const KernelEvent* ev) { - (void)ev; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -intptr_t APS5_VABI sceKernelGetEventFflags(const KernelEvent* ev) { - (void)ev; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI sceKernelGetEventFilter(const KernelEvent* ev) { - (void)ev; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -uintptr_t APS5_VABI sceKernelGetEventId(const KernelEvent* ev) { - (void)ev; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -void* APS5_VABI sceKernelGetEventUserData(const KernelEvent* ev) { - (void)ev; - NotImplemented_nid_no_patch(__func__); - return nullptr; -} - -uint64_t APS5_VABI sceKernelGetGPI(void) { - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI sceKernelGetModuleInfoForUnwind(uint64_t addr, int flags, ModuleInfoForUnwind* info) { - (void)addr; - (void)flags; - (void)info; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI sceKernelGetModuleInfoFromAddr(uint64_t addr, int n, ModuleInfo* r) { - (void)addr; - (void)n; - (void)r; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI sceKernelGetOpenPsId(void* open_ps_id) { - (void)open_ps_id; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI sceKernelGetPageTableStats(int* cpu_total, int* cpu_available, int* gpu_total, int* gpu_available) { - (void)cpu_total; - (void)cpu_available; - (void)gpu_total; - (void)gpu_available; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -void* APS5_VABI sceKernelGetProcParam(void) { - NotImplemented_nid_no_patch(__func__); - return nullptr; -} - -int APS5_VABI sceKernelGetPrtAperture(int index, void** addr, size_t* len) { - (void)index; - (void)addr; - (void)len; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -MallocReplace* APS5_VABI sceKernelGetSanitizerMallocReplaceExternal(void) { - NotImplemented_nid_no_patch(__func__); - return nullptr; -} - -NewReplace* APS5_VABI sceKernelGetSanitizerNewReplaceExternal(void) { - NotImplemented_nid_no_patch(__func__); - return nullptr; -} - -int APS5_VABI sceKernelGettimeofday(KernelTimeval* tp) { - (void)tp; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI sceKernelGettimezone(KernelTimezone* tz) { - (void)tz; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -uint64_t APS5_VABI sceKernelGetTscFrequency(void) { - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI sceKernelInstallExceptionHandler(int signum, void* handler) { - (void)signum; - (void)handler; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI sceKernelIsAddressSanitizerEnabled(void) { - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI sceKernelIsStack(void* addr, void** start, void** end) { - (void)addr; - (void)start; - (void)end; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -KernelModule APS5_VABI sceKernelLoadStartModule(const char* module_file_name, size_t args, const void* argp, uint32_t flags, const KernelLoadModuleOpt* opt, int* res) { - (void)module_file_name; - (void)args; - (void)argp; - (void)flags; - (void)opt; - (void)res; - NotImplemented_nid_no_patch(__func__); - return {}; -} - -int APS5_VABI sceKernelMemoryPoolBatch(const KernelMemoryPoolBatchEntry* entries, int num_entries, int* num_entries_out, int flags) { - (void)entries; - (void)num_entries; - (void)num_entries_out; - (void)flags; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI sceKernelMemoryPoolCommit(void* addr, size_t len, int type, int prot, int flags) { - (void)addr; - (void)len; - (void)type; - (void)prot; - (void)flags; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI sceKernelMemoryPoolDecommit(void* addr, size_t len, int flags) { - (void)addr; - (void)len; - (void)flags; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI sceKernelMemoryPoolExpand(int64_t search_start, int64_t search_end, size_t len, size_t alignment, int64_t* phys_addr_out) { - (void)search_start; - (void)search_end; - (void)len; - (void)alignment; - (void)phys_addr_out; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI sceKernelMemoryPoolGetBlockStats(KernelMemoryPoolBlockStats* output, size_t output_size) { - (void)output; - (void)output_size; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI sceKernelMemoryPoolReserve(void* addr_in, size_t len, size_t alignment, int flags, void** addr_out) { - (void)addr_in; - (void)len; - (void)alignment; - (void)flags; - (void)addr_out; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI sceKernelMkdir(const char* path, uint16_t mode) { - (void)path; - (void)mode; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI sceKernelMtypeprotect(const void* addr, size_t len, int type, int prot) { - (void)addr; - (void)len; - (void)type; - (void)prot; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI sceKernelPollEventFlag(KernelEventFlag ef, uint64_t bit_pattern, uint32_t wait_mode, uint64_t* result_pat) { - (void)ef; - (void)bit_pattern; - (void)wait_mode; - (void)result_pat; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int64_t APS5_VABI sceKernelPread(int d, void* buf, size_t nbytes, int64_t offset) { - (void)d; - (void)buf; - (void)nbytes; - (void)offset; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int64_t APS5_VABI sceKernelPwrite(int d, const void* buf, size_t nbytes, int64_t offset) { - (void)d; - (void)buf; - (void)nbytes; - (void)offset; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI sceKernelQueryMemoryProtection(void* addr, void** start, void** end, int* prot) { - (void)addr; - (void)start; - (void)end; - (void)prot; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI sceKernelRaiseException(Pthread thread, int signum) { - (void)thread; - (void)signum; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -uint64_t APS5_VABI sceKernelReadTsc(void) { - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI sceKernelRemoveExceptionHandler(int signum) { - (void)signum; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI sceKernelRename(const char* from, const char* to) { - (void)from; - (void)to; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI sceKernelRmdir(const char* path) { - (void)path; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -void APS5_VABI sceKernelRtldSetApplicationHeapAPI(void* api[]) { - (void)api; - NotImplemented_nid_no_patch(__func__); -} - -int APS5_VABI sceKernelRtldThreadAtexitDecrement(uint64_t* c) { - (void)c; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI sceKernelRtldThreadAtexitIncrement(uint64_t* c) { - (void)c; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI sceKernelSetEventFlag(KernelEventFlag ef, uint64_t bit_pattern) { - (void)ef; - (void)bit_pattern; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -void APS5_VABI sceKernelSetGPO(uint32_t bits) { - (void)bits; - NotImplemented_nid_no_patch(__func__); -} - -int APS5_VABI sceKernelSetPrtAperture(int index, void* addr, size_t len) { - (void)index; - (void)addr; - (void)len; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -void APS5_VABI sceKernelSetThreadAtexitCount(get_thread_atexit_count_func_t func) { - (void)func; - NotImplemented_nid_no_patch(__func__); -} - -void APS5_VABI sceKernelSetThreadAtexitReport(thread_atexit_report_func_t func) { - (void)func; - NotImplemented_nid_no_patch(__func__); -} - -void APS5_VABI sceKernelSetThreadDtors(thread_dtors_func_t dtors) { - (void)dtors; - NotImplemented_nid_no_patch(__func__); -} - -int APS5_VABI sceKernelSetVirtualRangeName(const void* addr, uint64_t len, const char* name) { - (void)addr; - (void)len; - (void)name; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -unsigned int APS5_VABI sceKernelSleep(unsigned int seconds) { - (void)seconds; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI sceKernelStopUnloadModule(KernelModule handle, size_t args, const void* argp, uint32_t flags, const KernelUnloadModuleOpt* opt, int* res) { - (void)handle; - (void)args; - (void)argp; - (void)flags; - (void)opt; - (void)res; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -void APS5_VABI sceKernelSync(void) { - NotImplemented_nid_no_patch(__func__); -} - -int APS5_VABI sceKernelUuidCreate(uint32_t* uuid) { - (void)uuid; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI sceKernelWaitEventFlag(KernelEventFlag ef, uint64_t bit_pattern, uint32_t wait_mode, uint64_t* result_pat, KernelUseconds* timeout) { - (void)ef; - (void)bit_pattern; - (void)wait_mode; - (void)result_pat; - (void)timeout; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI sched_get_priority_max_nid_postfix(int policy) { - (void)policy; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI sched_get_priority_min_nid_postfix(int policy) { - (void)policy; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI select_nid_postfix(int nfds, void* readfds, void* writefds, void* exceptfds, const void* timeout) { - (void)nfds; - (void)readfds; - (void)writefds; - (void)exceptfds; - (void)timeout; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI sem_destroy_nid_postfix(void* sem) { - (void)sem; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI sem_getvalue_nid_postfix(void* sem, int* value) { - (void)sem; - (void)value; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI sem_init_nid_postfix(void* sem, int pshared, unsigned int value) { - (void)sem; - (void)pshared; - (void)value; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI sem_post_nid_postfix(void* sem) { - (void)sem; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI sem_reltimedwait_np_nid_postfix(void* sem, uint32_t usec) { - (void)sem; - (void)usec; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI sem_timedwait_nid_postfix(void* sem, const KernelTimespec* abstime) { - (void)sem; - (void)abstime; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI sem_trywait_nid_postfix(void* sem) { - (void)sem; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI sem_wait_nid_postfix(void* sem) { - (void)sem; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int64_t APS5_VABI send_nid_postfix(int s, const void* buf, uint64_t len, int flags) { - (void)s; - (void)buf; - (void)len; - (void)flags; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int64_t APS5_VABI sendto_nid_postfix(int s, const void* buf, uint64_t len, int flags, const void* addr, uint32_t addrlen) { - (void)s; - (void)buf; - (void)len; - (void)flags; - (void)addr; - (void)addrlen; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI setsockopt_nid_postfix(int s, int level, int optname, const void* optval, uint32_t optlen) { - (void)s; - (void)level; - (void)optname; - (void)optval; - (void)optlen; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI sigprocmask_nid_postfix(int how, const void* set, void* oset) { - (void)how; - (void)set; - (void)oset; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI socket_nid_postfix(int family, int type, int protocol) { - (void)family; - (void)type; - (void)protocol; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI stat_nid_postfix(const char* path, FileStat* sb) { - (void)path; - (void)sb; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int64_t APS5_VABI write_nid_postfix(int d, const char* str, int64_t size) { - (void)d; - (void)str; - (void)size; - NotImplemented_nid_no_patch(__func__); - return 0; -} - -} diff --git a/core/libs/prx/libkernel/File/src/Stdio.cpp b/core/libs/prx/libkernel/File/src/Stdio.cpp new file mode 100644 index 000000000..f3dc9fa59 --- /dev/null +++ b/core/libs/prx/libkernel/File/src/Stdio.cpp @@ -0,0 +1,180 @@ +#include +#include +#include "SceTypes.hpp" +#include "prx/libc/include/General.hpp" + +extern "C" { + +int APS5_VABI chmod_nid_postfix(const char* path, int mode) { + (void)path; + (void)mode; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI close_nid_postfix(int d) { + (void)d; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI flock_nid_postfix(int d, int operation) { + (void)d; + (void)operation; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int64_t APS5_VABI fstat_nid_disambig1_nid_postfix(int d, FileStat* sb) { + (void)d; + (void)sb; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI ftruncate_nid_postfix(int d, int64_t length) { + (void)d; + (void)length; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int64_t APS5_VABI lseek_nid_postfix(int d, int64_t offset, int whence) { + (void)d; + (void)offset; + (void)whence; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI mkdir_nid_postfix(const char* path, uint16_t mode) { + (void)path; + (void)mode; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI open_nid_postfix(const char* path, int flags, int mode) { + (void)path; + (void)flags; + (void)mode; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int64_t APS5_VABI pread_nid_postfix(int d, void* buf, size_t nbytes, int64_t offset) { + (void)d; + (void)buf; + (void)nbytes; + (void)offset; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int64_t APS5_VABI pwrite_nid_disambig1_nid_postfix(int d, const void* buf, size_t nbytes, int64_t offset) { + (void)d; + (void)buf; + (void)nbytes; + (void)offset; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int64_t APS5_VABI read_nid_postfix(int d, void* buf, uint64_t nbytes) { + (void)d; + (void)buf; + (void)nbytes; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int64_t APS5_VABI write_nid_postfix(int d, const char* str, int64_t size) { + (void)d; + (void)str; + (void)size; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI stat_nid_postfix(const char* path, FileStat* sb) { + (void)path; + (void)sb; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI sceKernelCheckReachability(const char* path) { + (void)path; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI sceKernelFstat(int d, FileStat* sb) { + (void)d; + (void)sb; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI sceKernelFsync(int fd) { + (void)fd; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI sceKernelGetdents(int fd, char* buf, int nbytes) { + (void)fd; + (void)buf; + (void)nbytes; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI sceKernelGetdirentries(int fd, char* buf, int nbytes, int64_t* basep) { + (void)fd; + (void)buf; + (void)nbytes; + (void)basep; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI sceKernelMkdir(const char* path, uint16_t mode) { + (void)path; + (void)mode; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int64_t APS5_VABI sceKernelPread(int d, void* buf, size_t nbytes, int64_t offset) { + (void)d; + (void)buf; + (void)nbytes; + (void)offset; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int64_t APS5_VABI sceKernelPwrite(int d, const void* buf, size_t nbytes, int64_t offset) { + (void)d; + (void)buf; + (void)nbytes; + (void)offset; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI sceKernelRename(const char* from, const char* to) { + (void)from; + (void)to; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI sceKernelRmdir(const char* path) { + (void)path; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +} diff --git a/core/libs/prx/libkernel/Module/src/Module.cpp b/core/libs/prx/libkernel/Module/src/Module.cpp new file mode 100644 index 000000000..c34c4577a --- /dev/null +++ b/core/libs/prx/libkernel/Module/src/Module.cpp @@ -0,0 +1,54 @@ +#include +#include +#include "SceTypes.hpp" +#include "prx/libc/include/General.hpp" + +extern "C" { + +int APS5_VABI sceKernelDlsym(KernelModule handle, const char* symbol, void** addr) { + (void)handle; + (void)symbol; + (void)addr; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI sceKernelGetModuleInfoForUnwind(uint64_t addr, int flags, ModuleInfoForUnwind* info) { + (void)addr; + (void)flags; + (void)info; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI sceKernelGetModuleInfoFromAddr(uint64_t addr, int n, ModuleInfo* r) { + (void)addr; + (void)n; + (void)r; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +KernelModule APS5_VABI sceKernelLoadStartModule(const char* module_file_name, size_t args, const void* argp, uint32_t flags, const KernelLoadModuleOpt* opt, int* res) { + (void)module_file_name; + (void)args; + (void)argp; + (void)flags; + (void)opt; + (void)res; + NotImplemented_nid_no_patch(__func__); + return {}; +} + +int APS5_VABI sceKernelStopUnloadModule(KernelModule handle, size_t args, const void* argp, uint32_t flags, const KernelUnloadModuleOpt* opt, int* res) { + (void)handle; + (void)args; + (void)argp; + (void)flags; + (void)opt; + (void)res; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +} diff --git a/core/libs/prx/libkernel/Pthread/Posix/Attr.cpp b/core/libs/prx/libkernel/Pthread/Posix/Attr.cpp new file mode 100644 index 000000000..c3c9af8a8 --- /dev/null +++ b/core/libs/prx/libkernel/Pthread/Posix/Attr.cpp @@ -0,0 +1,112 @@ +#include +#include +#include "SceTypes.hpp" +#include "prx/libc/include/General.hpp" + +extern "C" { + +int APS5_VABI pthread_attr_destroy_nid_postfix(PthreadAttr* attr) { + (void)attr; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI pthread_attr_get_np_nid_postfix(Pthread thread, PthreadAttr* attr) { + (void)thread; + (void)attr; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI pthread_attr_getdetachstate_nid_postfix(const PthreadAttr* attr, int* state) { + (void)attr; + (void)state; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI pthread_attr_getguardsize_nid_postfix(const PthreadAttr* attr, size_t* guard_size) { + (void)attr; + (void)guard_size; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI pthread_attr_getschedparam_nid_postfix(const PthreadAttr* attr, KernelSchedParam* param) { + (void)attr; + (void)param; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI pthread_attr_getschedpolicy_nid_postfix(const PthreadAttr* attr, int* policy) { + (void)attr; + (void)policy; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI pthread_attr_getstack_nid_postfix(const PthreadAttr* __restrict attr, void** __restrict stack_addr, size_t* __restrict stack_size) { + (void)attr; + (void)stack_addr; + (void)stack_size; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI pthread_attr_getstacksize_nid_postfix(const PthreadAttr* attr, size_t* stack_size) { + (void)attr; + (void)stack_size; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI pthread_attr_init_nid_postfix(PthreadAttr* attr) { + (void)attr; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI pthread_attr_setdetachstate_nid_postfix(PthreadAttr* attr, int state) { + (void)attr; + (void)state; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI pthread_attr_setguardsize_nid_postfix(PthreadAttr* attr, size_t guard_size) { + (void)attr; + (void)guard_size; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI pthread_attr_setinheritsched_nid_postfix(PthreadAttr* attr, int inherit_sched) { + (void)attr; + (void)inherit_sched; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI pthread_attr_setschedparam_nid_postfix(PthreadAttr* attr, const KernelSchedParam* param) { + (void)attr; + (void)param; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI pthread_attr_setschedpolicy_nid_postfix(PthreadAttr* attr, int policy) { + (void)attr; + (void)policy; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI pthread_attr_setstacksize_nid_postfix(PthreadAttr* attr, size_t stack_size) { + (void)attr; + (void)stack_size; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +} diff --git a/core/libs/prx/libkernel/Pthread/Posix/Cond.cpp b/core/libs/prx/libkernel/Pthread/Posix/Cond.cpp new file mode 100644 index 000000000..b860a2262 --- /dev/null +++ b/core/libs/prx/libkernel/Pthread/Posix/Cond.cpp @@ -0,0 +1,61 @@ +#include +#include +#include "SceTypes.hpp" +#include "prx/libc/include/General.hpp" + +extern "C" { + +int APS5_VABI pthread_cond_broadcast_nid_postfix(PthreadCond* cond) { + (void)cond; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI pthread_cond_init_nid_postfix(PthreadCond* cond, const PthreadCondattr* attr) { + (void)cond; + (void)attr; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI pthread_cond_signal_nid_postfix(PthreadCond* cond) { + (void)cond; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI pthread_cond_timedwait_nid_postfix(PthreadCond* cond, PthreadMutex* mutex, const KernelTimespec* abstime) { + (void)cond; + (void)mutex; + (void)abstime; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI pthread_cond_wait_nid_postfix(PthreadCond* cond, PthreadMutex* mutex) { + (void)cond; + (void)mutex; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI pthread_condattr_destroy_nid_postfix(PthreadCondattr* attr) { + (void)attr; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI pthread_condattr_init_nid_postfix(PthreadCondattr* attr) { + (void)attr; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI pthread_condattr_setclock_nid_postfix(PthreadCondattr* attr, KernelClockid clock_id) { + (void)attr; + (void)clock_id; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +} diff --git a/core/libs/prx/libkernel/Pthread/Posix/Mutex.cpp b/core/libs/prx/libkernel/Pthread/Posix/Mutex.cpp new file mode 100644 index 000000000..1409b3450 --- /dev/null +++ b/core/libs/prx/libkernel/Pthread/Posix/Mutex.cpp @@ -0,0 +1,72 @@ +#include +#include +#include "SceTypes.hpp" +#include "prx/libc/include/General.hpp" + +extern "C" { + +int APS5_VABI pthread_mutex_destroy_nid_postfix(PthreadMutex* mutex) { + (void)mutex; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI pthread_mutex_init_nid_postfix(PthreadMutex* mutex, const PthreadMutexattr* attr) { + (void)mutex; + (void)attr; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI pthread_mutex_lock_nid_postfix(PthreadMutex* mutex) { + (void)mutex; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI pthread_mutex_timedlock_nid_postfix(PthreadMutex* mutex, const KernelTimespec* abstime) { + (void)mutex; + (void)abstime; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI pthread_mutex_trylock_nid_postfix(PthreadMutex* mutex) { + (void)mutex; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI pthread_mutex_unlock_nid_postfix(PthreadMutex* mutex) { + (void)mutex; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI pthread_mutexattr_destroy_nid_postfix(PthreadMutexattr* attr) { + (void)attr; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI pthread_mutexattr_init_nid_postfix(PthreadMutexattr* attr) { + (void)attr; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI pthread_mutexattr_setprotocol_nid_postfix(PthreadMutexattr* attr, int protocol) { + (void)attr; + (void)protocol; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI pthread_mutexattr_settype_nid_postfix(PthreadMutexattr* attr, int type) { + (void)attr; + (void)type; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +} diff --git a/core/libs/prx/libkernel/Pthread/Posix/Rwlock.cpp b/core/libs/prx/libkernel/Pthread/Posix/Rwlock.cpp new file mode 100644 index 000000000..2f1ee6a98 --- /dev/null +++ b/core/libs/prx/libkernel/Pthread/Posix/Rwlock.cpp @@ -0,0 +1,27 @@ +#include +#include +#include "SceTypes.hpp" +#include "prx/libc/include/General.hpp" + +extern "C" { + +int APS5_VABI pthread_rwlock_destroy_nid_postfix(PthreadRwlock* rwlock) { + (void)rwlock; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI pthread_rwlock_init_nid_postfix(PthreadRwlock* rwlock, const PthreadRwlockattr* attr) { + (void)rwlock; + (void)attr; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI pthread_rwlock_wrlock_nid_postfix(PthreadRwlock* rwlock) { + (void)rwlock; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +} diff --git a/core/libs/prx/libkernel/Pthread/Posix/Sem.cpp b/core/libs/prx/libkernel/Pthread/Posix/Sem.cpp new file mode 100644 index 000000000..ad7fb1493 --- /dev/null +++ b/core/libs/prx/libkernel/Pthread/Posix/Sem.cpp @@ -0,0 +1,61 @@ +#include +#include +#include "SceTypes.hpp" +#include "prx/libc/include/General.hpp" + +extern "C" { + +int APS5_VABI sem_init_nid_postfix(void* sem, int pshared, unsigned int value) { + (void)sem; + (void)pshared; + (void)value; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI sem_destroy_nid_postfix(void* sem) { + (void)sem; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI sem_wait_nid_postfix(void* sem) { + (void)sem; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI sem_trywait_nid_postfix(void* sem) { + (void)sem; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI sem_timedwait_nid_postfix(void* sem, const KernelTimespec* abstime) { + (void)sem; + (void)abstime; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI sem_reltimedwait_np_nid_postfix(void* sem, uint32_t usec) { + (void)sem; + (void)usec; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI sem_post_nid_postfix(void* sem) { + (void)sem; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI sem_getvalue_nid_postfix(void* sem, int* value) { + (void)sem; + (void)value; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +} diff --git a/core/libs/prx/libkernel/Pthread/Posix/Thread.cpp b/core/libs/prx/libkernel/Pthread/Posix/Thread.cpp new file mode 100644 index 000000000..da9083fc4 --- /dev/null +++ b/core/libs/prx/libkernel/Pthread/Posix/Thread.cpp @@ -0,0 +1,92 @@ +#include +#include +#include "SceTypes.hpp" +#include "prx/libc/include/General.hpp" + + +extern "C" { + +int APS5_VABI pthread_create_nid_postfix(Pthread* thread, const PthreadAttr* attr, pthread_entry_func_t entry, void* arg) { + (void)thread; + (void)attr; + (void)entry; + (void)arg; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI pthread_create_name_np_nid_postfix(Pthread* thread, const PthreadAttr* attr, pthread_entry_func_t entry, void* arg, const char* name) { + (void)thread; + (void)attr; + (void)entry; + (void)arg; + (void)name; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI pthread_detach_nid_postfix(Pthread thread) { + (void)thread; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +void APS5_VABI pthread_exit_nid_postfix(void* value) { + (void)value; + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI pthread_getschedparam_nid_postfix(Pthread thread, int* policy, KernelSchedParam* param) { + (void)thread; + (void)policy; + (void)param; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI pthread_join_nid_postfix(Pthread thread, void** value) { + (void)thread; + (void)value; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI pthread_rename_np_nid_postfix(Pthread thread, const char* name) { + (void)thread; + (void)name; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +Pthread APS5_VABI pthread_self_nid_postfix(void) { + NotImplemented_nid_no_patch(__func__); + return {}; +} + +int APS5_VABI pthread_setcancelstate_nid_postfix(int state, int* old_state) { + (void)state; + (void)old_state; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI pthread_setprio_nid_postfix(Pthread thread, int prio) { + (void)thread; + (void)prio; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI pthread_setschedparam_nid_postfix(Pthread thread, int policy, const KernelSchedParam* param) { + (void)thread; + (void)policy; + (void)param; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +void APS5_VABI pthread_yield_nid_postfix(void) { + NotImplemented_nid_no_patch(__func__); +} + +} diff --git a/core/libs/prx/libkernel/Pthread/Posix/Tsd.cpp b/core/libs/prx/libkernel/Pthread/Posix/Tsd.cpp new file mode 100644 index 000000000..a5e15b3cc --- /dev/null +++ b/core/libs/prx/libkernel/Pthread/Posix/Tsd.cpp @@ -0,0 +1,34 @@ +#include +#include +#include "SceTypes.hpp" +#include "prx/libc/include/General.hpp" + +extern "C" { + +void* APS5_VABI pthread_getspecific_nid_postfix(PthreadKey key) { + (void)key; + NotImplemented_nid_no_patch(__func__); + return nullptr; +} + +int APS5_VABI pthread_setspecific_nid_postfix(PthreadKey key, void* value) { + (void)key; + (void)value; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI pthread_key_create_nid_postfix(PthreadKey* key, pthread_key_destructor_func_t destructor) { + (void)key; + (void)destructor; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI pthread_key_delete_nid_postfix(PthreadKey key) { + (void)key; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +} diff --git a/core/libs/prx/libkernel/Pthread/src/Rwlock.cpp b/core/libs/prx/libkernel/Pthread/src/Rwlock.cpp index 797b07bab..12a6040a2 100644 --- a/core/libs/prx/libkernel/Pthread/src/Rwlock.cpp +++ b/core/libs/prx/libkernel/Pthread/src/Rwlock.cpp @@ -1,12 +1,6 @@ #include "../include/Pthread.hpp" #include "prx/libc/include/General.hpp" -// --------------------------------------------------------------------------- -// Reader/writer locks (scePthreadRwlock*). Moved as-is (not yet implemented) -// from the duplicated stubs in libkernel_sys/Export.cpp and -// libkernel_web/Export.cpp. -// --------------------------------------------------------------------------- - extern "C" { int APS5_VABI scePthreadRwlockDestroy(PthreadRwlock* rwlock) { diff --git a/core/libs/prx/libkernel/Pthread/src/Sem.cpp b/core/libs/prx/libkernel/Pthread/src/Sem.cpp index 8894f1bb5..079711862 100644 --- a/core/libs/prx/libkernel/Pthread/src/Sem.cpp +++ b/core/libs/prx/libkernel/Pthread/src/Sem.cpp @@ -1,13 +1,6 @@ #include "../include/Pthread.hpp" #include "prx/libc/include/General.hpp" -// --------------------------------------------------------------------------- -// POSIX-style pthread semaphores (scePthreadSem*). Not to be confused with -// the native sceKernel* semaphore in libkernel/Semaphore. Moved as-is -// (not yet implemented) from the duplicated stubs in libkernel_sys/Export.cpp -// and libkernel_web/Export.cpp. -// --------------------------------------------------------------------------- - extern "C" { int APS5_VABI scePthreadSemDestroy(void* sem) { diff --git a/core/libs/prx/libkernel/Pthread/src/Tsd.cpp b/core/libs/prx/libkernel/Pthread/src/Tsd.cpp index 3cfd850ba..adc9ce121 100644 --- a/core/libs/prx/libkernel/Pthread/src/Tsd.cpp +++ b/core/libs/prx/libkernel/Pthread/src/Tsd.cpp @@ -1,12 +1,6 @@ #include "../include/Pthread.hpp" #include "prx/libc/include/General.hpp" -// --------------------------------------------------------------------------- -// Thread-specific data (pthread keys). Moved as-is (not yet implemented) -// from the duplicated stubs in libkernel_sys/Export.cpp and -// libkernel_web/Export.cpp. -// --------------------------------------------------------------------------- - extern "C" { int APS5_VABI scePthreadKeyCreate(PthreadKey* key, pthread_key_destructor_func_t destructor) { diff --git a/core/libs/prx/libkernel/Semaphore/src/Semaphore.cpp b/core/libs/prx/libkernel/Semaphore/src/Semaphore.cpp index e85aba9d3..ac822495f 100644 --- a/core/libs/prx/libkernel/Semaphore/src/Semaphore.cpp +++ b/core/libs/prx/libkernel/Semaphore/src/Semaphore.cpp @@ -68,4 +68,22 @@ int APS5_VABI sceKernelWaitSema(KernelSema sem, int need, KernelUseconds* time) return KERNEL_SEMA_OK; } +// --------------------------------------------------------------------------- +// Moved as-is (not yet implemented) from the monolithic libkernel/Export.cpp. +// --------------------------------------------------------------------------- + +int APS5_VABI sceKernelCancelSema(KernelSema sem, int count, int* threads) { + (void)sem; + (void)count; + (void)threads; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI sceKernelDeleteSema(KernelSema sem) { + (void)sem; + NotImplemented_nid_no_patch(__func__); + return 0; +} + } diff --git a/core/libs/prx/libkernel/Socket/src/Socket.cpp b/core/libs/prx/libkernel/Socket/src/Socket.cpp new file mode 100644 index 000000000..40ad59a0a --- /dev/null +++ b/core/libs/prx/libkernel/Socket/src/Socket.cpp @@ -0,0 +1,150 @@ +#include +#include +#include "SceTypes.hpp" +#include "prx/libc/include/General.hpp" + +extern "C" { + +int APS5_VABI accept_nid_postfix(int s, void* addr, uint32_t* addrlen) { + (void)s; + (void)addr; + (void)addrlen; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI bind_nid_postfix(int s, const void* addr, uint32_t addrlen) { + (void)s; + (void)addr; + (void)addrlen; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI connect_nid_postfix(int s, const void* addr, uint32_t addrlen) { + (void)s; + (void)addr; + (void)addrlen; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI listen_nid_postfix(int s, int backlog) { + (void)s; + (void)backlog; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI socket_nid_postfix(int family, int type, int protocol) { + (void)family; + (void)type; + (void)protocol; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI getsockname_nid_postfix(int s, void* addr, uint32_t* addrlen) { + (void)s; + (void)addr; + (void)addrlen; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI getsockopt_nid_postfix(int s, int level, int optname, void* optval, uint32_t* optlen) { + (void)s; + (void)level; + (void)optname; + (void)optval; + (void)optlen; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI setsockopt_nid_postfix(int s, int level, int optname, const void* optval, uint32_t optlen) { + (void)s; + (void)level; + (void)optname; + (void)optval; + (void)optlen; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int64_t APS5_VABI send_nid_postfix(int s, const void* buf, uint64_t len, int flags) { + (void)s; + (void)buf; + (void)len; + (void)flags; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int64_t APS5_VABI sendto_nid_postfix(int s, const void* buf, uint64_t len, int flags, const void* addr, uint32_t addrlen) { + (void)s; + (void)buf; + (void)len; + (void)flags; + (void)addr; + (void)addrlen; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int64_t APS5_VABI recv_nid_postfix(int s, void* buf, uint64_t len, int flags) { + (void)s; + (void)buf; + (void)len; + (void)flags; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int64_t APS5_VABI recvfrom_nid_postfix(int s, void* buf, uint64_t len, int flags, void* addr, uint32_t* addrlen) { + (void)s; + (void)buf; + (void)len; + (void)flags; + (void)addr; + (void)addrlen; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +const char* APS5_VABI inet_ntop_nid_postfix(int af, const void* src, char* dst, uint32_t size) { + (void)af; + (void)src; + (void)dst; + (void)size; + NotImplemented_nid_no_patch(__func__); + return nullptr; +} + +int APS5_VABI inet_pton_nid_postfix(int af, const char* src, void* dst) { + (void)af; + (void)src; + (void)dst; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI select_nid_postfix(int nfds, void* readfds, void* writefds, void* exceptfds, const void* timeout) { + (void)nfds; + (void)readfds; + (void)writefds; + (void)exceptfds; + (void)timeout; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI sigprocmask_nid_postfix(int how, const void* set, void* oset) { + (void)how; + (void)set; + (void)oset; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +} diff --git a/core/libs/prx/libkernel/System/src/Coredump.cpp b/core/libs/prx/libkernel/System/src/Coredump.cpp new file mode 100644 index 000000000..f8df644e0 --- /dev/null +++ b/core/libs/prx/libkernel/System/src/Coredump.cpp @@ -0,0 +1,21 @@ +#include +#include +#include "SceTypes.hpp" +#include "prx/libc/include/General.hpp" + +extern "C" { + +int APS5_VABI sceCoredumpRegisterCoredumpHandler(uint64_t handler, size_t stack_size, uint64_t context) { + (void)handler; + (void)stack_size; + (void)context; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI sceCoredumpUnregisterCoredumpHandler(void) { + NotImplemented_nid_no_patch(__func__); + return 0; +} + +} diff --git a/core/libs/prx/libkernel/System/src/Exception.cpp b/core/libs/prx/libkernel/System/src/Exception.cpp new file mode 100644 index 000000000..74eebeaef --- /dev/null +++ b/core/libs/prx/libkernel/System/src/Exception.cpp @@ -0,0 +1,40 @@ +#include +#include +#include "SceTypes.hpp" +#include "prx/libc/include/General.hpp" + +extern "C" { + +int APS5_VABI sceKernelInstallExceptionHandler(int signum, void* handler) { + (void)signum; + (void)handler; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI sceKernelRemoveExceptionHandler(int signum) { + (void)signum; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI sceKernelRaiseException(Pthread thread, int signum) { + (void)thread; + (void)signum; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +void APS5_VABI sceKernelDebugRaiseException(int c1, int c2) { + (void)c1; + (void)c2; + NotImplemented_nid_no_patch(__func__); +} + +void APS5_VABI sceKernelDebugRaiseExceptionOnReleaseMode(int c1, int c2) { + (void)c1; + (void)c2; + NotImplemented_nid_no_patch(__func__); +} + +} diff --git a/core/libs/prx/libkernel/System/src/Process.cpp b/core/libs/prx/libkernel/System/src/Process.cpp new file mode 100644 index 000000000..a9d28ee5e --- /dev/null +++ b/core/libs/prx/libkernel/System/src/Process.cpp @@ -0,0 +1,81 @@ +#include +#include +#include "SceTypes.hpp" +#include "prx/libc/include/General.hpp" + +extern "C" { + +int APS5_VABI getargc_nid_postfix(void) { + NotImplemented_nid_no_patch(__func__); + return 0; +} + +const char** APS5_VABI getargv_nid_postfix(void) { + NotImplemented_nid_no_patch(__func__); + return nullptr; +} + +int APS5_VABI getpagesize_nid_postfix(void) { + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI getpid_nid_postfix(void) { + NotImplemented_nid_no_patch(__func__); + return 0; +} + +void APS5_VABI exit_nid_postfix(int code) { + (void)code; + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceKernelGetCurrentCpu(void) { + NotImplemented_nid_no_patch(__func__); + return 0; +} + +uint64_t APS5_VABI sceKernelGetGPI(void) { + NotImplemented_nid_no_patch(__func__); + return 0; +} + +void APS5_VABI sceKernelSetGPO(uint32_t bits) { + (void)bits; + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceKernelGetOpenPsId(void* open_ps_id) { + (void)open_ps_id; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +void* APS5_VABI sceKernelGetProcParam(void) { + NotImplemented_nid_no_patch(__func__); + return nullptr; +} + +int APS5_VABI sceKernelUuidCreate(uint32_t* uuid) { + (void)uuid; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +void APS5_VABI sceKernelSync(void) { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sched_get_priority_max_nid_postfix(int policy) { + (void)policy; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI sched_get_priority_min_nid_postfix(int policy) { + (void)policy; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +} diff --git a/core/libs/prx/libkernel/System/src/Rtld.cpp b/core/libs/prx/libkernel/System/src/Rtld.cpp new file mode 100644 index 000000000..b83c933a2 --- /dev/null +++ b/core/libs/prx/libkernel/System/src/Rtld.cpp @@ -0,0 +1,40 @@ +#include +#include +#include "SceTypes.hpp" +#include "prx/libc/include/General.hpp" + +extern "C" { + +void APS5_VABI sceKernelRtldSetApplicationHeapAPI(void* api[]) { + (void)api; + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceKernelRtldThreadAtexitDecrement(uint64_t* c) { + (void)c; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI sceKernelRtldThreadAtexitIncrement(uint64_t* c) { + (void)c; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +void APS5_VABI sceKernelSetThreadAtexitCount(get_thread_atexit_count_func_t func) { + (void)func; + NotImplemented_nid_no_patch(__func__); +} + +void APS5_VABI sceKernelSetThreadAtexitReport(thread_atexit_report_func_t func) { + (void)func; + NotImplemented_nid_no_patch(__func__); +} + +void APS5_VABI sceKernelSetThreadDtors(thread_dtors_func_t dtors) { + (void)dtors; + NotImplemented_nid_no_patch(__func__); +} + +} diff --git a/core/libs/prx/libkernel/System/src/Sanitizer.cpp b/core/libs/prx/libkernel/System/src/Sanitizer.cpp new file mode 100644 index 000000000..452a93743 --- /dev/null +++ b/core/libs/prx/libkernel/System/src/Sanitizer.cpp @@ -0,0 +1,23 @@ +#include +#include +#include "SceTypes.hpp" +#include "prx/libc/include/General.hpp" + +extern "C" { + +int APS5_VABI sceKernelIsAddressSanitizerEnabled(void) { + NotImplemented_nid_no_patch(__func__); + return 0; +} + +MallocReplace* APS5_VABI sceKernelGetSanitizerMallocReplaceExternal(void) { + NotImplemented_nid_no_patch(__func__); + return nullptr; +} + +NewReplace* APS5_VABI sceKernelGetSanitizerNewReplaceExternal(void) { + NotImplemented_nid_no_patch(__func__); + return nullptr; +} + +} diff --git a/core/libs/prx/libkernel/Time/Time.cpp b/core/libs/prx/libkernel/Time/Time.cpp index 96ae9f02a..aeb9cafb9 100644 --- a/core/libs/prx/libkernel/Time/Time.cpp +++ b/core/libs/prx/libkernel/Time/Time.cpp @@ -236,4 +236,69 @@ int APS5_VABI clock_getres_nid_postfix(int clockId, KernelTimespec* res) { #endif } +// --------------------------------------------------------------------------- +// Moved as-is (not yet implemented) from the monolithic libkernel/Export.cpp. +// --------------------------------------------------------------------------- + +int APS5_VABI sceKernelClockGetres(KernelClockid clock_id, KernelTimespec* tp) { + (void)clock_id; + (void)tp; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI sceKernelClockGettime(KernelClockid clock_id, KernelTimespec* tp) { + (void)clock_id; + (void)tp; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI sceKernelConvertLocaltimeToUtc(int64_t local_time, int64_t reserved, int64_t* utc_time, KernelTimezone* timezone, int32_t* dst_seconds) { + (void)local_time; + (void)reserved; + (void)utc_time; + (void)timezone; + (void)dst_seconds; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI sceKernelConvertUtcToLocaltime(int64_t utc_time, int64_t* local_time, KernelTimesec* st, uint64_t* dst_sec) { + (void)utc_time; + (void)local_time; + (void)st; + (void)dst_sec; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI sceKernelGettimeofday(KernelTimeval* tp) { + (void)tp; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI sceKernelGettimezone(KernelTimezone* tz) { + (void)tz; + NotImplemented_nid_no_patch(__func__); + return 0; +} + +uint64_t APS5_VABI sceKernelReadTsc(void) { + NotImplemented_nid_no_patch(__func__); + return 0; +} + +uint64_t APS5_VABI sceKernelGetTscFrequency(void) { + NotImplemented_nid_no_patch(__func__); + return 0; +} + +unsigned int APS5_VABI sceKernelSleep(unsigned int seconds) { + (void)seconds; + NotImplemented_nid_no_patch(__func__); + return 0; +} + }