diff --git a/H/Regs.h b/H/Regs.h index af569c988..44e38a4ae 100644 --- a/H/Regs.h +++ b/H/Regs.h @@ -132,6 +132,9 @@ typedef struct int sba_end_; int sba_size_; #endif /* SBA */ +#if (defined(YAPOR) || defined(TABLING)) && defined(THREADS) + struct local_data *LOCAL_; +#endif #endif /* YAPOR || THREADS */ #if PUSH_REGS /* On a X86 machine, the best solution is to keep the @@ -697,6 +700,9 @@ EXTERN inline void restore_B(void) { #ifdef COROUTINING #define DelayedVars Yap_REGS.DelayedVars_ #endif +#if (defined(YAPOR) || defined(TABLING)) && defined(THREADS) +#define LOCAL Yap_REGS.LOCAL_ +#endif #define CurrentModule Yap_REGS.CurrentModule_ #define ARITH_EXCEPTION Yap_REGS.ARITH_EXCEPTION_ #define Yap_isint Yap_REGS.isint_ diff --git a/H/YapHeap.h b/H/YapHeap.h index 015aa5f24..86eca7411 100755 --- a/H/YapHeap.h +++ b/H/YapHeap.h @@ -186,7 +186,6 @@ typedef struct worker_local_struct { Term global_delay_arena; yamop trust_lu_code[3]; #if (defined(YAPOR) || defined(TABLING) ) && defined(THREADS) - struct local_data *local; #ifdef YAPOR struct worker worker; #endif /* YAPOR */ @@ -370,7 +369,6 @@ extern struct various_codes *Yap_heap_regs; #define GLOBAL Yap_heap_regs->global #define REMOTE Yap_heap_regs->remote #ifdef THREADS -#define LOCAL Yap_heap_regs->WL.local #define WORKER Yap_heap_regs->WL.worker #endif #endif /* YAPOR || TABLING */ diff --git a/OPTYap/opt.structs.h b/OPTYap/opt.structs.h index 3bba5f66d..59caf4d4a 100644 --- a/OPTYap/opt.structs.h +++ b/OPTYap/opt.structs.h @@ -371,8 +371,6 @@ struct local_data{ #endif /* TABLING */ }; -extern struct local_data *LOCAL; - #define LOCAL_lock (LOCAL->lock) #define LOCAL_load (LOCAL->load) #if THREADS diff --git a/OPTYap/or.macros.h b/OPTYap/or.macros.h index 7d51a9857..0b2b3f451 100644 --- a/OPTYap/or.macros.h +++ b/OPTYap/or.macros.h @@ -319,11 +319,9 @@ void SCH_set_load(choiceptr current_cp) { LOCAL_load = lub; else LOCAL_load = lub + YAMOP_LTT(current_cp->cp_ap); - return; } - static inline void SCH_new_alternative(yamop *curpc, yamop *new) { OrFr_alternative(LOCAL_top_or_fr) = new;