fix uninitalised lock and reconsult test.

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1971 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc
2007-11-01 10:01:35 +00:00
parent d3bbba177f
commit b5c8c9bad3
6 changed files with 14 additions and 7 deletions

View File

@@ -492,6 +492,7 @@ Yap_GetPredPropByFunc(Functor f, Term cur_mod)
Prop p0;
READ_LOCK(f->FRWLock);
p0 = GetPredPropByFuncHavingLock(f, cur_mod);
READ_UNLOCK(f->FRWLock);
return (p0);
@@ -646,8 +647,9 @@ Yap_NewPredPropByFunctor(FunctorEntry *fe, Term cur_mod)
PredHash[hsh] = p;
}
PredsInHashTable++;
if (10*PredsInHashTable > 6*PredHashTableSize)
if (10*PredsInHashTable > 6*PredHashTableSize) {
ExpandPredHash();
}
WRITE_UNLOCK(PredHashRWLock);
/* make sure that we have something here */
RepPredProp(fe->PropsOfFE)->NextOfPE = fe->PropsOfFE;