summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qbuffer.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2022-04-04 18:00:36 +0200
committerMarc Mutz <marc.mutz@qt.io>2022-04-06 10:44:40 +0000
commit2fb7c94f63ce783c7f36149791fe72e053933ece (patch)
tree418bbff5f1d4681900298af1f4310a985d9b1564 /src/corelib/io/qbuffer.cpp
parentad26d6a18d024d55a1325295cefafc991dc08a79 (diff)
QDom: optimize an atomic read
By the time setNodeValue() gets its hands on the removed object, the removeChild() function has already called removed->ref.deref(), which performs an acquire fence if the ref-count drops to zero. IOW: if removed->ref == 0 now, then an acquire fence has been executed. If ref != 0, then we're not reaching into removed, so we need no acquire. Therefore, a relaxed load suffices (as opposed to the loadAcquire() the implicit conversion operator performs). Found by disabling QAtomic<T> -> T implicit conversions. Change-Id: I367754fde0ad82db797161b5e94e2ebc08a90c0b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/io/qbuffer.cpp')
0 files changed, 0 insertions, 0 deletions