mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-28 13:28:01 +03:00
Implement cond_one sync primitive
Change futex() args to use unsigned int
This commit is contained in:
parent
06253c8489
commit
6104685ad6
6 changed files with 170 additions and 39 deletions
|
@ -51,11 +51,11 @@ void semaphore_base::imp_wait()
|
|||
if (value >= 0)
|
||||
{
|
||||
// Signal other waiter to wake up or to restore sign bit
|
||||
futex(&m_value.raw(), FUTEX_WAKE_PRIVATE, 1, nullptr, nullptr, 0);
|
||||
futex(&m_value, FUTEX_WAKE_PRIVATE, 1);
|
||||
return;
|
||||
}
|
||||
|
||||
futex(&m_value.raw(), FUTEX_WAIT_PRIVATE, value, nullptr, nullptr, 0);
|
||||
futex(&m_value, FUTEX_WAIT_PRIVATE, value);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -67,7 +67,7 @@ void semaphore_base::imp_post(s32 _old)
|
|||
#ifdef _WIN32
|
||||
NtReleaseKeyedEvent(nullptr, &m_value, false, nullptr);
|
||||
#else
|
||||
futex(&m_value.raw(), FUTEX_WAKE_PRIVATE, 1, nullptr, nullptr, 0);
|
||||
futex(&m_value, FUTEX_WAKE_PRIVATE, 1);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue