thread_management: Fix windows build

This commit is contained in:
TheTurtle 2024-07-05 00:20:55 +03:00 committed by GitHub
parent 1d58a0403e
commit 3f123bbce2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -977,9 +977,10 @@ ScePthread PThreadPool::Create() {
} }
} }
#ifndef _WIN64 #ifdef _WIN64
auto* ret = new PthreadInternal{}; auto* ret = new PthreadInternal{};
#else #else
// TODO: Linux specific hack
static u8* hint_address = reinterpret_cast<u8*>(0x7FFFFC000ULL); static u8* hint_address = reinterpret_cast<u8*>(0x7FFFFC000ULL);
auto* ret = reinterpret_cast<PthreadInternal*>( auto* ret = reinterpret_cast<PthreadInternal*>(
mmap(hint_address, sizeof(PthreadInternal), PROT_READ | PROT_WRITE, mmap(hint_address, sizeof(PthreadInternal), PROT_READ | PROT_WRITE,