From 4d54ea4c92aebda795d76e9a9b258f08e80db963 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADtor=20Manuel=20de=20Morais=20Santos=20Costa?= Date: Tue, 26 Jan 2010 11:40:32 +0000 Subject: [PATCH] improve PP on threaded version --- C/absmi.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/C/absmi.c b/C/absmi.c index 27323a373..acf644273 100644 --- a/C/absmi.c +++ b/C/absmi.c @@ -1058,6 +1058,9 @@ Yap_absmi(int inp) LOCK(PREG->u.OtaLl.d->ClPred->StatisticsForPred.lock); PREG->u.OtaLl.d->ClPred->StatisticsForPred.NOfRetries++; UNLOCK(PREG->u.OtaLl.d->ClPred->StatisticsForPred.lock); +#ifdef THREADS + PP = PREG->u.OtaLl.d->ClPred; +#endif PREG = PREG->u.OtaLl.d->ClCode; #ifdef FROZEN_STACKS S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); @@ -1342,6 +1345,9 @@ Yap_absmi(int inp) LOCK(PREG->u.OtaLl.d->ClPred->StatisticsForPred.lock); PREG->u.OtaLl.d->ClPred->StatisticsForPred.NOfRetries++; UNLOCK(PREG->u.OtaLl.d->ClPred->StatisticsForPred.lock); +#ifdef THREADS + PP = PREG->u.OtaLl.d->ClPred; +#endif PREG = PREG->u.OtaLl.d->ClCode; #ifdef FROZEN_STACKS S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); @@ -8403,6 +8409,9 @@ Yap_absmi(int inp) B = B_YREG; #ifdef YAPOR SCH_set_load(B_YREG); +#endif /* YAPOR */ +#ifdef YAPOR + PP = PREG->u.OtaLl.d->ClPred; #endif /* YAPOR */ if (!VALID_TIMESTAMP(timestamp, PREG->u.OtaLl.d)) { /* jump to next alternative */ @@ -8437,6 +8446,9 @@ Yap_absmi(int inp) } restore_yaam_regs(PREG->u.OtaLl.n); restore_at_least_one_arg(PREG->u.OtaLl.s); +#ifdef THREADS + PP = PREG->u.OtaLl.d->ClPred; +#endif PREG = PREG->u.OtaLl.d->ClCode; #ifdef FROZEN_STACKS S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG);