fix bb usage of DB.

This commit is contained in:
Vítor Santos Costa 2014-10-11 01:39:09 +01:00
parent 84527a8c77
commit b2cd81f79a
1 changed files with 14 additions and 11 deletions

View File

@ -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);