fix locking stuff.

This commit is contained in:
Vitor Santos Costa 2009-12-17 16:11:02 -02:00
parent 6aff7bda59
commit 5b8dc25eff
2 changed files with 5 additions and 0 deletions

View File

@ -440,6 +440,7 @@ Yap_HasOp(Atom a)
while (!EndOfPAEntr(pp) &&
( pp->KindOfPE != OpProperty))
pp = RepProp(pp->NextOfPE);
READ_UNLOCK(ae->ARWLock);
if (EndOfPAEntr(pp)) {
return FALSE;
} else {

View File

@ -2905,6 +2905,7 @@ cont_current_op(void)
next = op->OpNext;
if (Yap_unify_constant(ARG1,MkAtomTerm(op->OpName)) &&
unify_op(op)) {
READ_UNLOCK(op->OpRWLock);
if (next) {
EXTRA_CBACK_ARG(5,1) = (CELL) MkIntegerTerm((CELL)next);
return TRUE;
@ -2912,6 +2913,7 @@ cont_current_op(void)
cut_succeed();
}
} else {
READ_UNLOCK(op->OpRWLock);
if (next) {
EXTRA_CBACK_ARG(5,1) = (CELL) MkIntegerTerm((CELL)next);
return FALSE;
@ -2936,6 +2938,7 @@ cont_current_atom_op(void)
READ_LOCK(op->OpRWLock);
next = NextOp(RepOpProp(op->NextOfPE));
if (unify_op(op)) {
READ_UNLOCK(op->OpRWLock);
if (next) {
EXTRA_CBACK_ARG(5,1) = (CELL) MkIntegerTerm((CELL)next);
return TRUE;
@ -2943,6 +2946,7 @@ cont_current_atom_op(void)
cut_succeed();
}
} else {
READ_UNLOCK(op->OpRWLock);
if (next) {
EXTRA_CBACK_ARG(5,1) = (CELL) MkIntegerTerm((CELL)next);
return FALSE;