rpcsx/rpcs3/Emu/SysCalls/lv2/sys_lwcond.h
Alexandro Sánchez Bach 08d61163ea Removed external functions from SysCalls.h
* Replace `int` with `s32` as return type for syscalls.
* Renamed `SC_Something.*` files with the proper lv2 name
`sys_something.*`.
* Moving away from the lv2, those functions and folders that doesn't
correspond to lv2 functions. E.g. module functions from sys_io,
sysPrxForUser, cellGcmSys.
* Splitted some files (memory -> memory+mmapper) and merged other ones
(event+event_flag ->event, spu+spu_thread -> spu), according to common
sense, PSDevWiki docs, and checking firmware files.
* Removed external functions from `SysCalls.h`.

NOTE: What should we do about: cellGcmCallback? It's not a lv2 syscall
but it appears on the sc_table and it is actually called in games. Is
this some kind of hack?
2014-07-06 16:23:37 +02:00

35 lines
721 B
C

#pragma once
struct sys_lwcond_attribute_t
{
union
{
char name[8];
u64 name_u64;
};
};
struct sys_lwcond_t
{
be_t<u32> lwmutex;
be_t<u32> lwcond_queue;
};
struct Lwcond
{
SMutex signal;
SleepQueue m_queue;
Lwcond(u64 name)
: m_queue(name)
{
}
};
// SysCalls
s32 sys_lwcond_create(mem_ptr_t<sys_lwcond_t> lwcond, mem_ptr_t<sys_lwmutex_t> lwmutex, mem_ptr_t<sys_lwcond_attribute_t> attr);
s32 sys_lwcond_destroy(mem_ptr_t<sys_lwcond_t> lwcond);
s32 sys_lwcond_signal(mem_ptr_t<sys_lwcond_t> lwcond);
s32 sys_lwcond_signal_all(mem_ptr_t<sys_lwcond_t> lwcond);
s32 sys_lwcond_signal_to(mem_ptr_t<sys_lwcond_t> lwcond, u32 ppu_thread_id);
s32 sys_lwcond_wait(mem_ptr_t<sys_lwcond_t> lwcond, u64 timeout);