mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-20 22:05:12 +00:00
kernel: umtx: avoid notifying suspended processes
stub sys_prepare_to_suspend_process and sys_suspend_process fix sys_osem_trywait on bad descriptor
This commit is contained in:
parent
0da531a58e
commit
87c0cd7dad
3 changed files with 50 additions and 21 deletions
|
|
@ -23,14 +23,12 @@ std::errc shared_cv::impl_wait(shared_mutex &mutex, unsigned _val,
|
|||
result =
|
||||
m_value.wait(_val, useTimeout ? std::chrono::microseconds(usec_timeout)
|
||||
: std::chrono::microseconds::max());
|
||||
bool spurious = result == std::errc::resource_unavailable_try_again ||
|
||||
result == std::errc::interrupted;
|
||||
bool spurious = result == std::errc::resource_unavailable_try_again;
|
||||
|
||||
// Cleanup
|
||||
const auto old = m_value.fetch_op([&](unsigned &value) {
|
||||
// Remove waiter if no signals
|
||||
if ((value & ~c_waiter_mask) == 0) {
|
||||
|
||||
if (!spurious) {
|
||||
value -= 1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue