mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-09 00:14:56 +00:00
SPU: Regression fix after #12648
This commit is contained in:
parent
ec7b18dab5
commit
2807be7080
2 changed files with 37 additions and 20 deletions
|
|
@ -1107,6 +1107,14 @@ SAFE_BUFFERS(void) atomic_wait_engine::wait(const void* data, u32 size, u128 old
|
|||
|
||||
while (ptr_cmp(data, size, old_value, mask, ext))
|
||||
{
|
||||
if (s_tls_one_time_wait_cb)
|
||||
{
|
||||
if (!s_tls_one_time_wait_cb(attempts))
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef USE_FUTEX
|
||||
struct timespec ts;
|
||||
ts.tv_sec = timeout / 1'000'000'000;
|
||||
|
|
@ -1191,19 +1199,14 @@ SAFE_BUFFERS(void) atomic_wait_engine::wait(const void* data, u32 size, u128 old
|
|||
break;
|
||||
}
|
||||
|
||||
if (s_tls_one_time_wait_cb)
|
||||
{
|
||||
if (!s_tls_one_time_wait_cb(attempts))
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
// The condition of the callback overrides timeout escape because it makes little sense to do so when a custom condition is passed
|
||||
continue;
|
||||
}
|
||||
|
||||
if (timeout + 1)
|
||||
{
|
||||
if (s_tls_one_time_wait_cb)
|
||||
{
|
||||
// The condition of the callback overrides timeout escape because it makes little sense to do so when a custom condition is passed
|
||||
continue;
|
||||
}
|
||||
|
||||
// TODO: reduce timeout instead
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue