mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2024-11-26 20:50:40 +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
@ -286,7 +286,8 @@ int PS4_SYSV_ABI posix_pthread_create_name_np(PthreadT* thread, const PthreadAtt
|
||||
pthread_attr_init(&pattr);
|
||||
// pthread_attr_setstack(&pattr, new_thread->attr.stackaddr_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);
|
||||
if (ret) {
|
||||
*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;
|
||||
auto state = PthreadOnceState::InProgress;
|
||||
if (once_control->state.compare_exchange_strong(state, PthreadOnceState::NeverDone,
|
||||
|
Loading…
Reference in New Issue
Block a user