diff options
author | Ben Gamari <ben@smart-cactus.org> | 2019-11-06 19:20:08 -0500 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2019-11-07 21:25:36 -0500 |
commit | 23994738f2d40816a2a60d717dd5d5e939f05c66 (patch) | |
tree | 86da454fe2892cde5379a0f9445b4eeb780f9cdd /rts | |
parent | 870376f900f5024c782a0cb1f324462a985f017a (diff) | |
download | haskell-23994738f2d40816a2a60d717dd5d5e939f05c66.tar.gz |
rts/NonMoving: Fix various Windows build issues
The Windows build seems to be stricter about not providing threading
primitives in the non-threaded RTS.
Diffstat (limited to 'rts')
-rw-r--r-- | rts/sm/NonMovingMark.c | 9 | ||||
-rw-r--r-- | rts/sm/NonMovingSweep.c | 2 |
2 files changed, 6 insertions, 5 deletions
diff --git a/rts/sm/NonMovingMark.c b/rts/sm/NonMovingMark.c index 03e342806a..b7ab772bdd 100644 --- a/rts/sm/NonMovingMark.c +++ b/rts/sm/NonMovingMark.c @@ -218,19 +218,18 @@ StgIndStatic *debug_caf_list_snapshot = (StgIndStatic*)END_OF_CAF_LIST; * return x * */ -static Mutex upd_rem_set_lock; bdescr *upd_rem_set_block_list = NULL; - #if defined(THREADED_RTS) +static Mutex upd_rem_set_lock; + /* Used during the mark/sweep phase transition to track how many capabilities * have pushed their update remembered sets. Protected by upd_rem_set_lock. */ static volatile StgWord upd_rem_set_flush_count = 0; -#endif - /* Signaled by each capability when it has flushed its update remembered set */ static Condition upd_rem_set_flushed_cond; +#endif /* Indicates to mutators that the write barrier must be respected. Set while * concurrent mark is running. @@ -244,9 +243,9 @@ MarkQueue *current_mark_queue = NULL; /* Initialise update remembered set data structures */ void nonmovingMarkInitUpdRemSet() { +#if defined(THREADED_RTS) initMutex(&upd_rem_set_lock); initCondition(&upd_rem_set_flushed_cond); -#if defined(THREADED_RTS) initMutex(&nonmoving_large_objects_mutex); #endif } diff --git a/rts/sm/NonMovingSweep.c b/rts/sm/NonMovingSweep.c index cf5fcd70d7..b390959612 100644 --- a/rts/sm/NonMovingSweep.c +++ b/rts/sm/NonMovingSweep.c @@ -307,9 +307,11 @@ static void freeChain_lock_max(bdescr *bd, int max_dur) freeGroup(bd); bd = next_bd; if (i == max_dur) { +#if defined(THREADED_RTS) RELEASE_SM_LOCK; yieldThread(); ACQUIRE_SM_LOCK; +#endif i = 0; } i++; |