fix locking stuff.
This commit is contained in:
parent
6aff7bda59
commit
5b8dc25eff
@ -440,6 +440,7 @@ Yap_HasOp(Atom a)
|
|||||||
while (!EndOfPAEntr(pp) &&
|
while (!EndOfPAEntr(pp) &&
|
||||||
( pp->KindOfPE != OpProperty))
|
( pp->KindOfPE != OpProperty))
|
||||||
pp = RepProp(pp->NextOfPE);
|
pp = RepProp(pp->NextOfPE);
|
||||||
|
READ_UNLOCK(ae->ARWLock);
|
||||||
if (EndOfPAEntr(pp)) {
|
if (EndOfPAEntr(pp)) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
} else {
|
} else {
|
||||||
|
@ -2905,6 +2905,7 @@ cont_current_op(void)
|
|||||||
next = op->OpNext;
|
next = op->OpNext;
|
||||||
if (Yap_unify_constant(ARG1,MkAtomTerm(op->OpName)) &&
|
if (Yap_unify_constant(ARG1,MkAtomTerm(op->OpName)) &&
|
||||||
unify_op(op)) {
|
unify_op(op)) {
|
||||||
|
READ_UNLOCK(op->OpRWLock);
|
||||||
if (next) {
|
if (next) {
|
||||||
EXTRA_CBACK_ARG(5,1) = (CELL) MkIntegerTerm((CELL)next);
|
EXTRA_CBACK_ARG(5,1) = (CELL) MkIntegerTerm((CELL)next);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@ -2912,6 +2913,7 @@ cont_current_op(void)
|
|||||||
cut_succeed();
|
cut_succeed();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
READ_UNLOCK(op->OpRWLock);
|
||||||
if (next) {
|
if (next) {
|
||||||
EXTRA_CBACK_ARG(5,1) = (CELL) MkIntegerTerm((CELL)next);
|
EXTRA_CBACK_ARG(5,1) = (CELL) MkIntegerTerm((CELL)next);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@ -2936,6 +2938,7 @@ cont_current_atom_op(void)
|
|||||||
READ_LOCK(op->OpRWLock);
|
READ_LOCK(op->OpRWLock);
|
||||||
next = NextOp(RepOpProp(op->NextOfPE));
|
next = NextOp(RepOpProp(op->NextOfPE));
|
||||||
if (unify_op(op)) {
|
if (unify_op(op)) {
|
||||||
|
READ_UNLOCK(op->OpRWLock);
|
||||||
if (next) {
|
if (next) {
|
||||||
EXTRA_CBACK_ARG(5,1) = (CELL) MkIntegerTerm((CELL)next);
|
EXTRA_CBACK_ARG(5,1) = (CELL) MkIntegerTerm((CELL)next);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@ -2943,6 +2946,7 @@ cont_current_atom_op(void)
|
|||||||
cut_succeed();
|
cut_succeed();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
READ_UNLOCK(op->OpRWLock);
|
||||||
if (next) {
|
if (next) {
|
||||||
EXTRA_CBACK_ARG(5,1) = (CELL) MkIntegerTerm((CELL)next);
|
EXTRA_CBACK_ARG(5,1) = (CELL) MkIntegerTerm((CELL)next);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
Reference in New Issue
Block a user