feat(libkernel): add new posix, pthread, semaphore, process funcs definitions

This commit is contained in:
boykopovar
2026-09-26 16:32:16 +03:00
parent 0783e369da
commit 40101471ee
8 changed files with 123 additions and 0 deletions
@@ -202,3 +202,14 @@ int APS5_VABI sceKernelBatchMap2(KernelBatchMapEntry* entries, int num_entries,
}
}
extern "C" {
int APS5_VABI sceKernelMlock_nid_postfix(void* address, std::uint64_t length) {
(void)address;
(void)length;
NotImplemented_nid_no_patch(__func__);
return 0;
}
}
@@ -187,3 +187,28 @@ int APS5_VABI sceKernelRmdir(const char* path) {
}
}
extern "C" {
int APS5_VABI sceKernelChmod_nid_postfix(const char* path, std::uint16_t mode) {
(void)path;
(void)mode;
NotImplemented_nid_no_patch(__func__);
return 0;
}
int APS5_VABI sceKernelTruncate_nid_postfix(const char* path, std::int64_t length) {
(void)path;
(void)length;
NotImplemented_nid_no_patch(__func__);
return 0;
}
int APS5_VABI sceKernelUtimes_nid_postfix(const char* path, const KernelTimeval* times) {
(void)path;
(void)times;
NotImplemented_nid_no_patch(__func__);
return 0;
}
}
@@ -52,3 +52,14 @@ int APS5_VABI sceKernelStopUnloadModule(KernelModule handle, size_t args, const
}
}
extern "C" {
int APS5_VABI __elf_phdr_match_addr_nid_postfix(ModuleInfo* module, std::uint64_t address) {
(void)module;
(void)address;
NotImplemented_nid_no_patch(__func__);
return 0;
}
}
@@ -1,3 +1,4 @@
#include "prx/libc/include/General.hpp"
#include "prx/libc/include/general/VabiMacros.hpp"
#include <condition_variable>
#include <cstddef>
@@ -41,3 +42,16 @@ extern "C" int APS5_VABI pthread_once_nid_postfix(
onceChanged.notify_all();
return 0;
}
using OnceRoutine = void (APS5_VABI *)();
extern "C" {
int APS5_VABI scePthreadOnce_nid_postfix(void* onceControl, OnceRoutine initRoutine) {
(void)onceControl;
(void)initRoutine;
NotImplemented_nid_no_patch(__func__);
return 0;
}
}
@@ -284,3 +284,12 @@ int APS5_VABI scePthreadSetprio(Pthread thread, int prio) {
}
}
extern "C" {
void APS5_VABI __pthread_cxa_finalize_nid_postfix(void* argument) {
(void)argument;
NotImplemented_nid_no_patch(__func__);
}
}
@@ -6,6 +6,8 @@
extern "C" {
char* __progname_nid_postfix = nullptr;
int APS5_VABI getargc_nid_postfix(void) {
NotImplemented_nid_no_patch(__func__);
return 0;
@@ -38,3 +38,43 @@ void APS5_VABI sceKernelSetThreadDtors(thread_dtors_func_t dtors) {
}
}
using ThreadAtexitCount = int (APS5_VABI *)(KernelModule module);
using ThreadAtexitReport = void (APS5_VABI *)(KernelModule module);
using ThreadDtors = void (APS5_VABI *)();
extern "C" {
void APS5_VABI _sceKernelRtldSetApplicationHeapAPI_nid_postfix(void* api[]) {
(void)api;
NotImplemented_nid_no_patch(__func__);
}
int APS5_VABI _sceKernelRtldThreadAtexitDecrement_nid_postfix(std::uint64_t* counter) {
(void)counter;
NotImplemented_nid_no_patch(__func__);
return 0;
}
int APS5_VABI _sceKernelRtldThreadAtexitIncrement_nid_postfix(std::uint64_t* counter) {
(void)counter;
NotImplemented_nid_no_patch(__func__);
return 0;
}
void APS5_VABI _sceKernelSetThreadAtexitCount_nid_postfix(ThreadAtexitCount callback) {
(void)callback;
NotImplemented_nid_no_patch(__func__);
}
void APS5_VABI _sceKernelSetThreadAtexitReport_nid_postfix(ThreadAtexitReport callback) {
(void)callback;
NotImplemented_nid_no_patch(__func__);
}
void APS5_VABI _sceKernelSetThreadDtors_nid_postfix(ThreadDtors callback) {
(void)callback;
NotImplemented_nid_no_patch(__func__);
}
}
@@ -1,3 +1,4 @@
#include "prx/libc/include/General.hpp"
#include "prx/libc/include/general/VabiMacros.hpp"
#include <atomic>
#include <csignal>
@@ -58,3 +59,13 @@ int APS5_VABI raise_nid_postfix(int guest) {
return result ? -1 : 0;
}
}
extern "C" {
int APS5_VABI _is_signal_return_nid_postfix(std::uint64_t programCounter) {
(void)programCounter;
NotImplemented_nid_no_patch(__func__);
return 0;
}
}