Revert PR 6405

This commit is contained in:
Nekotekina 2019-08-27 14:05:38 +03:00
parent ede816387f
commit fd839243ec
9 changed files with 2 additions and 31 deletions

View File

@ -1057,7 +1057,7 @@ void lv2_obj::sleep_unlocked(cpu_thread& thread, u64 timeout)
if (!g_to_awake.empty())
{
// Schedule pending entries
// Schedule pending entries
awake_unlocked({});
}
else
@ -1144,7 +1144,7 @@ void lv2_obj::awake_unlocked(cpu_thread* cpu, u32 prio)
// Emplace threads from list
emplace_thread(_cpu);
}
// Remove pending if necessary
if (!g_pending.empty() && cpu && cpu == get_current_cpu_thread())
{

View File

@ -264,9 +264,6 @@ error_code sys_cond_wait(ppu_thread& ppu, u32 cond_id, u64 timeout)
{
if (lv2_obj::wait_timeout(timeout, &ppu))
{
// Wait for rescheduling
ppu.check_state();
std::lock_guard lock(cond->mutex->mutex);
// Try to cancel the waiting
@ -281,8 +278,6 @@ error_code sys_cond_wait(ppu_thread& ppu, u32 cond_id, u64 timeout)
{
break;
}
cond->mutex->sleep(ppu);
}
timeout = 0;

View File

@ -292,9 +292,6 @@ error_code sys_event_queue_receive(ppu_thread& ppu, u32 equeue_id, vm::ptr<sys_e
{
if (lv2_obj::wait_timeout(timeout, &ppu))
{
// Wait for rescheduling
ppu.check_state();
std::lock_guard lock(queue->mutex);
if (!queue->unqueue(queue->sq, &ppu))

View File

@ -171,9 +171,6 @@ error_code sys_event_flag_wait(ppu_thread& ppu, u32 id, u64 bitptn, u32 mode, vm
{
if (lv2_obj::wait_timeout(timeout, &ppu))
{
// Wait for rescheduling
ppu.check_state();
std::lock_guard lock(flag->mutex);
if (!flag->unqueue(flag->sq, &ppu))

View File

@ -325,9 +325,6 @@ error_code _sys_lwcond_queue_wait(ppu_thread& ppu, u32 lwcond_id, u32 lwmutex_id
{
if (lv2_obj::wait_timeout(timeout, &ppu))
{
// Wait for rescheduling
ppu.check_state();
std::lock_guard lock(cond->mutex);
if (!cond->unqueue(cond->sq, &ppu))

View File

@ -130,9 +130,6 @@ error_code _sys_lwmutex_lock(ppu_thread& ppu, u32 lwmutex_id, u64 timeout)
{
if (lv2_obj::wait_timeout(timeout, &ppu))
{
// Wait for rescheduling
ppu.check_state();
std::lock_guard lock(mutex->mutex);
if (!mutex->unqueue(mutex->sq, &ppu))

View File

@ -165,9 +165,6 @@ error_code sys_mutex_lock(ppu_thread& ppu, u32 mutex_id, u64 timeout)
{
if (lv2_obj::wait_timeout(timeout, &ppu))
{
// Wait for rescheduling
ppu.check_state();
std::lock_guard lock(mutex->mutex);
if (!mutex->unqueue(mutex->sq, &ppu))

View File

@ -140,9 +140,6 @@ error_code sys_rwlock_rlock(ppu_thread& ppu, u32 rw_lock_id, u64 timeout)
{
if (lv2_obj::wait_timeout(timeout, &ppu))
{
// Wait for rescheduling
ppu.check_state();
std::lock_guard lock(rwlock->mutex);
if (!rwlock->unqueue(rwlock->rq, &ppu))
@ -340,9 +337,6 @@ error_code sys_rwlock_wlock(ppu_thread& ppu, u32 rw_lock_id, u64 timeout)
{
if (lv2_obj::wait_timeout(timeout, &ppu))
{
// Wait for rescheduling
ppu.check_state();
std::lock_guard lock(rwlock->mutex);
if (!rwlock->unqueue(rwlock->wq, &ppu))

View File

@ -131,9 +131,6 @@ error_code sys_semaphore_wait(ppu_thread& ppu, u32 sem_id, u64 timeout)
{
if (lv2_obj::wait_timeout(timeout, &ppu))
{
// Wait for rescheduling
ppu.check_state();
std::lock_guard lock(sem->mutex);
if (!sem->unqueue(sem->sq, &ppu))