mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-01-07 09:10:00 +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
45 lines
827 B
C++
45 lines
827 B
C++
#pragma once
|
|
|
|
#include "sys_sync.h"
|
|
|
|
struct lv2_mutex_t;
|
|
|
|
struct sys_cond_attribute_t
|
|
{
|
|
be_t<u32> pshared;
|
|
be_t<s32> flags;
|
|
be_t<u64> ipc_key;
|
|
|
|
union
|
|
{
|
|
char name[8];
|
|
u64 name_u64;
|
|
};
|
|
};
|
|
|
|
struct lv2_cond_t
|
|
{
|
|
const u64 name;
|
|
const std::shared_ptr<lv2_mutex_t> mutex; // associated mutex
|
|
|
|
sleep_queue<cpu_thread> sq;
|
|
|
|
lv2_cond_t(const std::shared_ptr<lv2_mutex_t>& mutex, u64 name)
|
|
: mutex(mutex)
|
|
, name(name)
|
|
{
|
|
}
|
|
|
|
void notify(lv2_lock_t, cpu_thread* thread);
|
|
};
|
|
|
|
class ppu_thread;
|
|
|
|
// SysCalls
|
|
s32 sys_cond_create(vm::ptr<u32> cond_id, u32 mutex_id, vm::ptr<sys_cond_attribute_t> attr);
|
|
s32 sys_cond_destroy(u32 cond_id);
|
|
s32 sys_cond_wait(ppu_thread& ppu, u32 cond_id, u64 timeout);
|
|
s32 sys_cond_signal(u32 cond_id);
|
|
s32 sys_cond_signal_all(u32 cond_id);
|
|
s32 sys_cond_signal_to(u32 cond_id, u32 thread_id);
|