summaryrefslogtreecommitdiff
path: root/rts/Capability.c
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2019-12-01 11:55:46 -0500
committerBen Gamari <ben@smart-cactus.org>2020-10-24 21:02:11 -0400
commitf97c59ce014687979fa731db7227773fa83d2156 (patch)
treec6ef7fd5d08d6a48ed23b256cab1a9fef890c901 /rts/Capability.c
parentbf1b0bc78da7dbe5f6fbda54b37a9cb165ff857f (diff)
downloadhaskell-f97c59ce014687979fa731db7227773fa83d2156.tar.gz
Mitigate data races in event manager startup/shutdownwip/tsan/event-mgr
Diffstat (limited to 'rts/Capability.c')
-rw-r--r--rts/Capability.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/rts/Capability.c b/rts/Capability.c
index 181075b963..9a0c92174d 100644
--- a/rts/Capability.c
+++ b/rts/Capability.c
@@ -1256,7 +1256,7 @@ void
setIOManagerControlFd(uint32_t cap_no USED_IF_THREADS, int fd USED_IF_THREADS) {
#if defined(THREADED_RTS)
if (cap_no < n_capabilities) {
- capabilities[cap_no]->io_manager_control_wr_fd = fd;
+ RELAXED_STORE(&capabilities[cap_no]->io_manager_control_wr_fd, fd);
} else {
errorBelch("warning: setIOManagerControlFd called with illegal capability number.");
}