aboutsummaryrefslogtreecommitdiffstats
path: root/cursor
diff options
context:
space:
mode:
authorFergus Dall <sidereal@google.com>2021-12-15 10:31:41 +1100
committerSimon Ser <contact@emersion.fr>2022-02-05 14:29:39 +0000
commite949b3bfbb92363724ef1bd5b2f5736de8a9f98a (patch)
tree103dceb211bbd3356747c389732b1f060947ec01 /cursor
parentUse zalloc for structs (diff)
downloadwayland-e949b3bfbb92363724ef1bd5b2f5736de8a9f98a.tar
wayland-e949b3bfbb92363724ef1bd5b2f5736de8a9f98a.tar.gz
wayland-e949b3bfbb92363724ef1bd5b2f5736de8a9f98a.tar.bz2
wayland-e949b3bfbb92363724ef1bd5b2f5736de8a9f98a.tar.lz
wayland-e949b3bfbb92363724ef1bd5b2f5736de8a9f98a.tar.xz
wayland-e949b3bfbb92363724ef1bd5b2f5736de8a9f98a.tar.zst
wayland-e949b3bfbb92363724ef1bd5b2f5736de8a9f98a.zip
display-test: Fix a race condition in test suite
Several tests in this suite use setting and checking client.display_stopped (in test-compositor.h) to synchronise between threads. This is a data race because display_stopped is a non-atomic int. Fix this by making it an atomic_bool instead. We don't need to change the access code because reads and writes are sequentially consistent by default. This can be reproduced (with both clang and gcc) by running ``` meson -Db_sanitize=thread build cd build ninja meson test ``` Signed-off-by: Fergus Dall <sidereal@google.com>
Diffstat (limited to 'cursor')
0 files changed, 0 insertions, 0 deletions