throw handler

This commit is contained in:
Vitor Santos Costa 2016-09-21 14:59:10 -05:00
parent 3fe4b70112
commit 87c6f13976

View File

@ -934,28 +934,29 @@ static void RestoreForeignCode__(USES_REGS1) {
} }
} }
static void RestoreBallTerm(int wid) {
CACHE_REGS
if (LOCAL_BallTerm) {
LOCAL_BallTerm = DBTermAdjust(LOCAL_BallTerm);
RestoreDBTerm(LOCAL_BallTerm, false, 1 PASS_REGS);
}
}
static void RestoreYapRecords__(USES_REGS1) { static void RestoreYapRecords__(USES_REGS1) {
struct record_list *ptr; struct record_list *ptr;
RestoreBallTerm(worker_id);
Yap_Records = DBRecordAdjust(Yap_Records); Yap_Records = DBRecordAdjust(Yap_Records);
ptr = Yap_Records; ptr = Yap_Records;
while (ptr) { while (ptr) {
ptr->next_rec = DBRecordAdjust(ptr->next_rec); ptr->next_rec = DBRecordAdjust(ptr->next_rec);
ptr->prev_rec = DBRecordAdjust(ptr->prev_rec); ptr->prev_rec = DBRecordAdjust(ptr->prev_rec);
ptr->dbrecord = DBTermAdjust(ptr->dbrecord); ptr->dbrecord = DBTermAdjust(ptr->dbrecord);
RestoreDBTerm(ptr->dbrecord, false,0 PASS_REGS); RestoreDBTerm(ptr->dbrecord, false, 0 PASS_REGS);
ptr = ptr->next_rec; ptr = ptr->next_rec;
} }
} }
static void RestoreBallTerm(int wid) {
CACHE_REGS
if (LOCAL_BallTerm) {
LOCAL_BallTerm = DBTermAdjust(LOCAL_BallTerm);
RestoreDBTerm(LOCAL_BallTerm, false,1 PASS_REGS);
}
}
#if defined(THREADS) || defined(YAPOR) #if defined(THREADS) || defined(YAPOR)
#include "rglobals.h" #include "rglobals.h"
#endif #endif