From b2cd81f79a9b8a996268fc259072b3d6ff0a12a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADtor=20Santos=20Costa?= Date: Sat, 11 Oct 2014 01:39:09 +0100 Subject: [PATCH] fix bb usage of DB. --- C/absmi.c | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/C/absmi.c b/C/absmi.c index 81d2a3e52..a901084e2 100755 --- a/C/absmi.c +++ b/C/absmi.c @@ -3148,19 +3148,22 @@ Yap_absmi(int inp) #if PARALLEL_YAP PredEntry *ap = cl->ClPred; #endif + /* BB support */ + if (ap) { - PELOCK(9,ap); - DEC_CLREF_COUNT(cl); - erase = (cl->ClFlags & ErasedMask) && !(cl->ClRefCount); - if (erase) { - saveregs(); - /* at this point, - we are the only ones accessing the clause, - hence we don't need to have a lock it */ - Yap_ErLogUpdCl(cl); - setregs(); + PELOCK(9,ap); + DEC_CLREF_COUNT(cl); + erase = (cl->ClFlags & ErasedMask) && !(cl->ClRefCount); + if (erase) { + saveregs(); + /* at this point, + we are the only ones accessing the clause, + hence we don't need to have a lock it */ + Yap_ErLogUpdCl(cl); + setregs(); + } + UNLOCK(ap->PELock); } - UNLOCK(ap->PELock); } } else { DynamicClause *cl = ClauseFlagsToDynamicClause(pt1);