Note [Concurrent non-moving collection]

rts/sm/NonMoving.c:259 rts

Concurrency-control of non-moving garbage collection is a bit tricky. There
are a few things to keep in mind:

 - Only one non-moving collection may be active at a time. This is enforced by the
   concurrent_coll_running flag, which is set when a collection is on-going. If
   we attempt to initiate a new collection while this is set we wait on the
   concurrent_coll_finished condition variable, which signals when the
   active collection finishes.

 - In between the mark and sweep phases the non-moving collector must synchronize
   with mutator threads to collect and mark their final update remembered
   sets. This is accomplished using
   stopAllCapabilitiesWith(SYNC_FLUSH_UPD_REM_SET). Capabilities are held
   the final mark has concluded.

Note that possibility of concurrent minor and non-moving collections
requires that we handle static objects a bit specially. See
Note [Static objects under the nonmoving collector] in Storage.c
for details.

References 0

This Note does not link to any other.

Referenced by 1