mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-02 21:11:25 +12:00
shared_mutex: Optimize busy-waiting by detecting waiters and try to steal the notifying bit
Add an unused has_waiters() method.
This commit is contained in:
parent
26e731b487
commit
2ec039365f
2 changed files with 34 additions and 3 deletions
|
@ -171,6 +171,11 @@ public:
|
|||
{
|
||||
return m_value.load() < c_one - 1;
|
||||
}
|
||||
|
||||
bool has_waiters() const
|
||||
{
|
||||
return m_value.load() > c_one;
|
||||
}
|
||||
};
|
||||
|
||||
// Simplified shared (reader) lock implementation.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue