atomic.cpp: Optimize sema_get to not always use atomic instruction (#8907)
This commit is contained in:
@@ -328,8 +328,11 @@ static bool sema_get(u32 id)
|
|||||||
{
|
{
|
||||||
// Increase reference from non-zero value
|
// Increase reference from non-zero value
|
||||||
refs++;
|
refs++;
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}))
|
|
||||||
|
return false;
|
||||||
|
}).second)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user