mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-01-08 01:30:13 +01:00
`CallbackManager` removed, added _gcm_intr_thread for cellGcmSys `PPUThread` renamed to `ppu_thread`, inheritance allowed Added lightweight command queue for `ppu_thread` Implemented call stack dump for PPU `get_current_thread_mutex` removed `thread_ctrl::spawn`: minor initialization fix `thread_ctrl::wait_for` added `named_thread`: some methods added `cpu_thread::run` added Some bugs fixes, including SPU channels
43 lines
925 B
C++
43 lines
925 B
C++
#pragma once
|
|
|
|
#include "Utilities/SleepQueue.h"
|
|
|
|
namespace vm { using namespace ps3; }
|
|
|
|
struct sys_lwmutex_t;
|
|
|
|
struct sys_lwcond_attribute_t
|
|
{
|
|
char name[8];
|
|
};
|
|
|
|
struct sys_lwcond_t
|
|
{
|
|
vm::bptr<sys_lwmutex_t> lwmutex;
|
|
be_t<u32> lwcond_queue; // lwcond pseudo-id
|
|
};
|
|
|
|
struct lv2_lwcond_t
|
|
{
|
|
const u64 name;
|
|
|
|
sleep_queue<cpu_thread> sq;
|
|
|
|
lv2_lwcond_t(u64 name)
|
|
: name(name)
|
|
{
|
|
}
|
|
|
|
void notify(lv2_lock_t, cpu_thread* thread, const std::shared_ptr<lv2_lwmutex_t>& mutex, bool mode2);
|
|
};
|
|
|
|
// Aux
|
|
class ppu_thread;
|
|
|
|
// SysCalls
|
|
s32 _sys_lwcond_create(vm::ptr<u32> lwcond_id, u32 lwmutex_id, vm::ptr<sys_lwcond_t> control, u64 name, u32 arg5);
|
|
s32 _sys_lwcond_destroy(u32 lwcond_id);
|
|
s32 _sys_lwcond_signal(u32 lwcond_id, u32 lwmutex_id, u32 ppu_thread_id, u32 mode);
|
|
s32 _sys_lwcond_signal_all(u32 lwcond_id, u32 lwmutex_id, u32 mode);
|
|
s32 _sys_lwcond_queue_wait(ppu_thread& ppu, u32 lwcond_id, u32 lwmutex_id, u64 timeout);
|