Bug
1802897 - Part 5: Add methods to update the mark bitmap atomically r=sfink
The mark bitmap is represented using relaxed atomics. Currently we update this
using separate load and store operations where possible as this is more
efficient but this is only possible if there are no concurrent writes.
Parallel marking will perform concurrent writes to the marking bitmap so
requires updates to be performed atomically.
The patch adds methods that are correct in the face of multiple writes
(different threads won't stomp over each others' updates) however the
markIfUnmarkedAtomic method can return false positives. It works out faster
overall to allow this and tolerate multiple threads trying to mark the same
thing at the same time occasionally than to have the extra synchronisation
overhead of avoiding it.
Differential Revision: https://phabricator.services.mozilla.com/
D163465