tests: Use uatomic for accessing global states
authorOlivier Dion <odion@efficios.com>
Wed, 29 Mar 2023 19:22:13 +0000 (15:22 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 14 Aug 2023 19:39:14 +0000 (15:39 -0400)
commitc8c32a5208d6e624f9ae9466196e355269c611d5
tree5be5f4391970efdd89ac7f9b95c3a24e0a6916fa
parent2ea38794876c907639971035ed29c4e59964fd7f
tests: Use uatomic for accessing global states

Global states accesses were protected via memory barriers. Use the
uatomic API with the CMM memory model so that TSAN does not warn about
non-atomic concurrent accesses.

Also, the thread id map mutex must be unlocked after setting the new
created thread id in the map. Otherwise, the new thread could observe an
unset id.

Change-Id: I1ecdc387b3f510621cbc116ad3b95c676f5d659a
Co-authored-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Olivier Dion <odion@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
tests/common/api.h
tests/regression/rcutorture.h
This page took 0.024808 seconds and 4 git commands to generate.