fix thread bug
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1943 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
parent
77f10fe803
commit
fd049830a3
@ -795,6 +795,7 @@ Yap_PredPropByFunctorNonThreadLocal(Functor f, Term cur_mod)
|
|||||||
return Yap_NewPredPropByFunctor(f,cur_mod);
|
return Yap_NewPredPropByFunctor(f,cur_mod);
|
||||||
|
|
||||||
if ((p->ModuleOfPred == cur_mod || !(p->ModuleOfPred))) {
|
if ((p->ModuleOfPred == cur_mod || !(p->ModuleOfPred))) {
|
||||||
|
WRITE_UNLOCK(f->FRWLock);
|
||||||
return AbsPredProp(p);
|
return AbsPredProp(p);
|
||||||
}
|
}
|
||||||
if (p->NextOfPE) {
|
if (p->NextOfPE) {
|
||||||
@ -807,6 +808,7 @@ Yap_PredPropByFunctorNonThreadLocal(Functor f, Term cur_mod)
|
|||||||
p->ModuleOfPred == cur_mod)
|
p->ModuleOfPred == cur_mod)
|
||||||
{
|
{
|
||||||
READ_UNLOCK(PredHashRWLock);
|
READ_UNLOCK(PredHashRWLock);
|
||||||
|
WRITE_UNLOCK(f->FRWLock);
|
||||||
return AbsPredProp(p);
|
return AbsPredProp(p);
|
||||||
}
|
}
|
||||||
p = RepPredProp(p->NextOfPE);
|
p = RepPredProp(p->NextOfPE);
|
||||||
|
@ -1346,6 +1346,7 @@ GetPredPropByFuncHavingLock (FunctorEntry *fe, Term cur_mod)
|
|||||||
#if THREADS
|
#if THREADS
|
||||||
/* Thread Local Predicates */
|
/* Thread Local Predicates */
|
||||||
if (p->PredFlags & ThreadLocalPredFlag) {
|
if (p->PredFlags & ThreadLocalPredFlag) {
|
||||||
|
READ_UNLOCK(PredHashRWLock);
|
||||||
return AbsPredProp (Yap_GetThreadPred (p));
|
return AbsPredProp (Yap_GetThreadPred (p));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user