atomic.cpp: Optimize sema_get to not always use atomic instruction (#8907)

This commit is contained in:
Eladash
2020-09-16 22:15:14 +03:00
committed by GitHub
parent 7900780cea
commit 17c8b34088
+4 -1
View File
@@ -328,8 +328,11 @@ static bool sema_get(u32 id)
{
// Increase reference from non-zero value
refs++;
return true;
}
}))
return false;
}).second)
{
return true;
}