mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-12 01:38:37 +12:00
Busy waiting added
This commit is contained in:
parent
b637bd3866
commit
b1aa87b515
7 changed files with 196 additions and 373 deletions
|
@ -898,3 +898,9 @@ constexpr FORCE_INLINE error_code::not_an_error not_an_error(const T& value)
|
|||
{
|
||||
return static_cast<error_code::not_an_error>(static_cast<s32>(value));
|
||||
}
|
||||
|
||||
// Synchronization helper (cache-friendly busy waiting)
|
||||
inline void busy_wait(std::size_t count = 100)
|
||||
{
|
||||
while (count--) _mm_pause();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue