From f3cefdf8955a1e2d1a3228576fa49fafd440953f Mon Sep 17 00:00:00 2001 From: Vitor Santos Costa Date: Fri, 4 Oct 2013 18:18:57 +0100 Subject: [PATCH] yapor stuff --- C/c_interface.c | 2 +- C/heapgc.c | 4 ++++ C/init.c | 6 +----- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/C/c_interface.c b/C/c_interface.c index 7754f717a..37bff71e6 100644 --- a/C/c_interface.c +++ b/C/c_interface.c @@ -3053,7 +3053,7 @@ YAP_Init(YAP_init_args *yap_init) In the SBA we cannot just happily inherit registers from the other workers */ - Yap_InitYaamRegs( 0 ); + Yap_InitYaamRegs( worker_id ); #endif /* YAPOR_COPY || YAPOR_SBA */ #ifndef YAPOR_THREADS Yap_InitPreAllocCodeSpace( 0 ); diff --git a/C/heapgc.c b/C/heapgc.c index a47b4c917..714e5d63d 100644 --- a/C/heapgc.c +++ b/C/heapgc.c @@ -4263,6 +4263,10 @@ Yap_gc(Int predarity, CELL *current_env, yamop *nextop) { CACHE_REGS int res; +#if YAPOR_COPY + fprintf(stderr, "\n\n***** Trying to call the garbage collector in YAPOR/copying ****\n\n\n"); + exit( 1 ); +#endif LOCAL_PrologMode |= GCMode; res=call_gc(4096, predarity, current_env, nextop PASS_REGS); LeaveGCMode( PASS_REGS1 ); diff --git a/C/init.c b/C/init.c index f0b3531f5..793ea9839 100755 --- a/C/init.c +++ b/C/init.c @@ -887,11 +887,7 @@ InitStdPreds(void) Yap_InitCPreds(); Yap_InitBackCPreds(); BACKUP_MACHINE_REGS(); -#if YAPOR - Yap_InitYaamRegs( worker_id ); -#else Yap_InitYaamRegs( 0 ); -#endif #if HAVE_MPE Yap_InitMPE (); @@ -1322,7 +1318,7 @@ Yap_InitWorkspace(UInt Heap, UInt Stack, UInt Trail, UInt Atts, UInt max_table_s else Atts = AdjustPageSize(Atts * K); Atts /= (K); -#if defined(YAPOR) || defined(THREADS) +#if defined(THREADS) || defined(YAPOR) worker_id = 0; #endif /* YAPOR || THREADS */ #ifdef YAPOR