mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-14 10:48:36 +12:00
Small fixes
This commit is contained in:
parent
336442eeba
commit
2200e6f4d9
5 changed files with 110 additions and 55 deletions
|
@ -4,6 +4,8 @@ class SSemaphore
|
|||
{
|
||||
const u32 m_max;
|
||||
u32 m_count;
|
||||
u32 m_in_order;
|
||||
u32 m_out_order;
|
||||
std::mutex m_mutex, m_cv_mutex;
|
||||
std::condition_variable m_cond;
|
||||
|
||||
|
@ -11,12 +13,16 @@ public:
|
|||
SSemaphore(u32 value, u32 max = 1)
|
||||
: m_max(max > 0 ? max : 0xffffffff)
|
||||
, m_count(value > m_max ? m_max : value)
|
||||
, m_in_order(0)
|
||||
, m_out_order(0)
|
||||
{
|
||||
}
|
||||
|
||||
SSemaphore()
|
||||
: m_max(0xffffffff)
|
||||
, m_count(0)
|
||||
, m_in_order(0)
|
||||
, m_out_order(0)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -24,7 +30,7 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
bool wait(u64 timeout = 0);
|
||||
void wait();
|
||||
|
||||
bool try_wait();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue