mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-03 05:21:25 +12:00
SPU: fix possible livelock
The bug affects TSX path
This commit is contained in:
parent
3681507136
commit
0797164fac
4 changed files with 33 additions and 19 deletions
|
@ -39,11 +39,11 @@ namespace utils
|
|||
|
||||
bool has_xop();
|
||||
|
||||
inline bool transaction_enter()
|
||||
FORCE_INLINE bool transaction_enter(uint* out = nullptr)
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
const auto status = _xbegin();
|
||||
const uint status = _xbegin();
|
||||
|
||||
if (status == _XBEGIN_STARTED)
|
||||
{
|
||||
|
@ -52,6 +52,11 @@ namespace utils
|
|||
|
||||
if (!(status & _XABORT_RETRY))
|
||||
{
|
||||
if (out)
|
||||
{
|
||||
*out = status;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue