diff options
| author | Fabian Kosmale <[email protected]> | 2025-10-16 11:23:33 +0200 |
|---|---|---|
| committer | Fabian Kosmale <[email protected]> | 2025-10-27 17:35:04 +0000 |
| commit | e89d20181bcd38c25180ff7943cf48941710ead9 (patch) | |
| tree | 8418bcaba37e9ea2e3b42ec407d6b7ea2bdf0d32 /examples/widgets/doc/src/affine.qdoc | |
| parent | 13f521e4983c7f3b4a77a4c521da1cfda992dad8 (diff) | |
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]>
Diffstat (limited to 'examples/widgets/doc/src/affine.qdoc')
0 files changed, 0 insertions, 0 deletions
