handle locking more carefully (especially protect gc and stack shifting).

This commit is contained in:
Vitor Santos Costa
2014-04-23 22:41:12 +01:00
parent 83ec7d9072
commit aba5f3d88b
22 changed files with 362 additions and 136 deletions

View File

@@ -432,9 +432,11 @@ p_dif( USES_REGS1 )
#ifdef COROUTINING
/* now restore Woken Goals to its old value */
Yap_UpdateTimedVar(LOCAL_WokenGoals, OldWokenGoals);
LOCK(LOCAL_SignalLock);
if (OldWokenGoals == TermNil) {
Yap_undo_signal(YAP_WAKEUP_SIGNAL);
}
UNLOCK(LOCAL_SignalLock);
#endif
/* restore B */
B = pt1;