mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-21 12:05:23 +00:00
atomic.cpp: Optimize sema_get to not always use atomic instruction (#8907)
This commit is contained in:
parent
7900780cea
commit
17c8b34088
1 changed files with 4 additions and 1 deletions
|
@ -328,8 +328,11 @@ static bool sema_get(u32 id)
|
|||
{
|
||||
// Increase reference from non-zero value
|
||||
refs++;
|
||||
return true;
|
||||
}
|
||||
}))
|
||||
|
||||
return false;
|
||||
}).second)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue