diff options
author | Ben Gamari <ben@smart-cactus.org> | 2019-12-01 15:08:33 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2020-10-24 21:00:37 -0400 |
commit | 06f80497b8bd5eea93b72989e9b58372ef482ef9 (patch) | |
tree | a7b355d6212c47372a6efb73134e0a61ed59b742 /rts/Messages.c | |
parent | d079b9435382882b0b069ea40bcd287db18082d3 (diff) | |
download | haskell-06f80497b8bd5eea93b72989e9b58372ef482ef9.tar.gz |
rts/Messages: Drop incredibly fishy write barrier
executeMessage previously had a write barrier at the beginning of its
loop apparently in an attempt to synchronize with another thread's
writes to the Message. I would guess that the author had intended to use
a load barrier here given that there are no globally-visible writes done
in executeMessage.
I've removed the redundant barrier since the necessary load barrier is
now provided by the ACQUIRE_LOAD.
Diffstat (limited to 'rts/Messages.c')
-rw-r--r-- | rts/Messages.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/rts/Messages.c b/rts/Messages.c index 71c2bfdb38..f2eac0c8cd 100644 --- a/rts/Messages.c +++ b/rts/Messages.c @@ -68,8 +68,6 @@ executeMessage (Capability *cap, Message *m) const StgInfoTable *i; loop: - write_barrier(); // allow m->header to be modified by another thread - // TODO: Is the above barrier actually needed? Why is it a write barrier? Something is fishy here. i = ACQUIRE_LOAD(&m->header.info); if (i == &stg_MSG_TRY_WAKEUP_info) { |