instrument PE locking

fix missing unlock in index_pred (if predicate had been indexed while we were
waiting).
This commit is contained in:
Vítor Santos Costa
2010-07-25 11:22:16 +01:00
parent 5b6014175e
commit e031026a62
12 changed files with 81 additions and 64 deletions

View File

@@ -607,7 +607,7 @@ FindAtom(codeToFind, arity)
pp = RepPredProp(pp->NextOfPE);
if (pp != NIL) {
CODEADDR *out;
LOCK(pp->PELock);
PELOCK(90,pp);
out = &(pp->CodeOfPred)
*arityp = pp->ArityOfPE;
UNLOCK(pp->PELock);
@@ -632,7 +632,7 @@ FindAtom(codeToFind, arity)
pp = RepPredProp(pp->NextOfPE);
if (pp != NIL) {
CODEADDR *out;
LOCK(pp->PELock);
PELOCK(91,pp);
out = &(pp->CodeOfPred)
*arityp = pp->ArityOfPE;
UNLOCK(pp->PELock);
@@ -3124,7 +3124,7 @@ p_flags(void)
return (FALSE);
if (EndOfPAEntr(pe))
return (FALSE);
LOCK(pe->PELock);
PELOCK(92,pe);
if (!Yap_unify_constant(ARG3, MkIntegerTerm(pe->PredFlags))) {
UNLOCK(pe->PELock);
return(FALSE);