diff --git a/H/rheap.h b/H/rheap.h index 51f424fd5..7b282fd45 100644 --- a/H/rheap.h +++ b/H/rheap.h @@ -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) { struct record_list *ptr; + RestoreBallTerm(worker_id); Yap_Records = DBRecordAdjust(Yap_Records); ptr = Yap_Records; while (ptr) { ptr->next_rec = DBRecordAdjust(ptr->next_rec); ptr->prev_rec = DBRecordAdjust(ptr->prev_rec); ptr->dbrecord = DBTermAdjust(ptr->dbrecord); - RestoreDBTerm(ptr->dbrecord, false,0 PASS_REGS); + RestoreDBTerm(ptr->dbrecord, false, 0 PASS_REGS); 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) #include "rglobals.h" #endif