You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is known that incrementing the refcount can use relaxed semantics,
compare
https://web.archive.org/web/20251016043603/https://devblogs.microsoft.com/oldnewthing/20251015-00/?p=111686
However, we can't modify QBasicAtomic::ref, because that is documented
to use "ordered" semantics.
So introduce a new (internal) refRelaxed method, which simply calls
fetchAndAddRelaxed(1) instead. Compared to ref, we also do not return
anything, as no expected user has a need for the return value (and it
only causes more work for the compiler to get rid of it again).
Our deref operation is still using acquire_release semantics, so
everything is fine.
Port QArrayData to use it as a first user so that the functionality is
tested.
Change-Id: I678870551fe85b83d9bb073ddb5947e649845264
Reviewed-by: Marc Mutz <[email protected]>
0 commit comments