some adjustments

This commit is contained in:
wheremyfoodat 2023-11-12 10:57:50 +02:00 committed by georgemoralis
parent 7e6c741ed7
commit e8c425850e
2 changed files with 4 additions and 3 deletions

View File

@ -20,7 +20,7 @@ void init_pthreads() {
g_pthread_cxt->setDefaultMutexattr(default_mutexattr); g_pthread_cxt->setDefaultMutexattr(default_mutexattr);
} }
void Pthread_Init_Self_MainThread() { void pthreadInitSelfMainThread() {
scePthreadAttrInit(&g_pthread_self.attr); scePthreadAttrInit(&g_pthread_self.attr);
g_pthread_self.pth = pthread_self(); g_pthread_self.pth = pthread_self();
g_pthread_self.name = "Main_Thread"; g_pthread_self.name = "Main_Thread";
@ -158,7 +158,7 @@ void* createMutex(void* addr) {
} }
auto vaddr = reinterpret_cast<u64>(addr); auto vaddr = reinterpret_cast<u64>(addr);
std::string name = fmt::format("mutex{:#x}",vaddr); std::string name = fmt::format("mutex{:#}",vaddr);
scePthreadMutexInit(static_cast<ScePthreadMutex*>(addr), nullptr, name.c_str()); scePthreadMutexInit(static_cast<ScePthreadMutex*>(addr), nullptr, name.c_str());
return addr; return addr;
} }

View File

@ -59,8 +59,9 @@ class PThreadCxt {
private: private:
ScePthreadMutexattr m_default_mutexattr = nullptr; ScePthreadMutexattr m_default_mutexattr = nullptr;
}; };
void init_pthreads(); void init_pthreads();
void Pthread_Init_Self_MainThread(); void pthreadInitSelfMainThread();
int PS4_SYSV_ABI scePthreadAttrInit(ScePthreadAttr* attr); int PS4_SYSV_ABI scePthreadAttrInit(ScePthreadAttr* attr);
int PS4_SYSV_ABI scePthreadAttrSetdetachstate(ScePthreadAttr* attr, int detachstate); int PS4_SYSV_ABI scePthreadAttrSetdetachstate(ScePthreadAttr* attr, int detachstate);