mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-08-03 14:48:46 +00:00
kernel: Pthread rewrite touchups for Windows
Some checks failed
Build and Release / reuse (push) Has been cancelled
Build and Release / clang-format (push) Has been cancelled
Build and Release / get-info (push) Has been cancelled
Build and Release / windows-sdl (push) Has been cancelled
Build and Release / windows-qt (push) Has been cancelled
Build and Release / macos-sdl (push) Has been cancelled
Build and Release / macos-qt (push) Has been cancelled
Build and Release / linux-sdl (push) Has been cancelled
Build and Release / linux-qt (push) Has been cancelled
Build and Release / pre-release (push) Has been cancelled
Some checks failed
Build and Release / reuse (push) Has been cancelled
Build and Release / clang-format (push) Has been cancelled
Build and Release / get-info (push) Has been cancelled
Build and Release / windows-sdl (push) Has been cancelled
Build and Release / windows-qt (push) Has been cancelled
Build and Release / macos-sdl (push) Has been cancelled
Build and Release / macos-qt (push) Has been cancelled
Build and Release / linux-sdl (push) Has been cancelled
Build and Release / linux-qt (push) Has been cancelled
Build and Release / pre-release (push) Has been cancelled
This commit is contained in:
parent
22430546dc
commit
d1247612e6
1 changed files with 3 additions and 2 deletions
|
@ -286,7 +286,8 @@ int PS4_SYSV_ABI posix_pthread_create_name_np(PthreadT* thread, const PthreadAtt
|
||||||
pthread_attr_init(&pattr);
|
pthread_attr_init(&pattr);
|
||||||
// pthread_attr_setstack(&pattr, new_thread->attr.stackaddr_attr,
|
// pthread_attr_setstack(&pattr, new_thread->attr.stackaddr_attr,
|
||||||
// new_thread->attr.stacksize_attr);
|
// new_thread->attr.stacksize_attr);
|
||||||
int ret = pthread_create(pthr, &pattr, (PthreadEntryFunc)RunThread, new_thread);
|
using WinPthreadEntry = void *(*)(void*);
|
||||||
|
int ret = pthread_create(pthr, &pattr, (WinPthreadEntry)RunThread, new_thread);
|
||||||
ASSERT_MSG(ret == 0, "Failed to create thread with error {}", ret);
|
ASSERT_MSG(ret == 0, "Failed to create thread with error {}", ret);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
*thread = nullptr;
|
*thread = nullptr;
|
||||||
|
@ -343,7 +344,7 @@ int PS4_SYSV_ABI posix_pthread_once(PthreadOnce* once_control, void (*init_routi
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto once_cancel_handler = [](void* arg) {
|
const auto once_cancel_handler = [](void* arg) PS4_SYSV_ABI {
|
||||||
PthreadOnce* once_control = (PthreadOnce*)arg;
|
PthreadOnce* once_control = (PthreadOnce*)arg;
|
||||||
auto state = PthreadOnceState::InProgress;
|
auto state = PthreadOnceState::InProgress;
|
||||||
if (once_control->state.compare_exchange_strong(state, PthreadOnceState::NeverDone,
|
if (once_control->state.compare_exchange_strong(state, PthreadOnceState::NeverDone,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue