/* This file, rglobals.h, was generated automatically by "yap -L misc/buildheap"
please do not update, update misc/GLOBALS instead */
static void RestoreWorker(int wid USES_REGS) {
FOREIGN_WL(wid)->global_arena = TermToGlobalOrAtomAdjust(FOREIGN_WL(wid)->global_arena);
RestoreBallTerm(wid);
#ifdef COROUTINING
FOREIGN_WL(wid)->woken_goals = TermToGlobalAdjust(FOREIGN_WL(wid)->woken_goals);
FOREIGN_WL(wid)->atts_mutable_list = TermToGlobalAdjust(FOREIGN_WL(wid)->atts_mutable_list);
#endif
FOREIGN_WL(wid)->gc_generation = TermToGlobalAdjust(FOREIGN_WL(wid)->gc_generation);
FOREIGN_WL(wid)->gc_phase = TermToGlobalAdjust(FOREIGN_WL(wid)->gc_phase);
#if LOW_LEVEL_TRACER
#if defined(YAPOR) || defined(THREADS)
REINIT_LOCK(FOREIGN_WL(wid)->signal_lock);
#if DEBUG && COROUTINING
#if GC_NO_TAGS
#if defined(TABLING) || defined(SBA)
#else
#endif /* defined(YAPOR) || defined(THREADS) */
FOREIGN_WL(wid)->dynamic_arrays = PtoArrayEAdjust(FOREIGN_WL(wid)->dynamic_arrays);
FOREIGN_WL(wid)->static_arrays = PtoArraySAdjust(FOREIGN_WL(wid)->static_arrays);
FOREIGN_WL(wid)->global_variables = PtoGlobalEAdjust(FOREIGN_WL(wid)->global_variables);
#if (defined(YAPOR) || defined(TABLING)) && defined(THREADS)
#ifdef THREADS
#define FOREIGN_ThreadHandle(wid) (Yap_WLocal[(wid)]->thread_handle)
#define MY_ThreadHandle (Yap_WLocal[worker_id]->thread_handle)
}
static void RestoreGlobal(void) {
#if THREADS
REINIT_LOCK(Yap_global->bgl);
#if HAVE_LIBREADLINE
REINIT_LOCK(Yap_global->thread_handles_lock);
#if defined(YAPOR) || defined(TABLING)