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:
parent
d3bbba177f
commit
b5c8c9bad3
@ -492,6 +492,7 @@ Yap_GetPredPropByFunc(Functor f, Term cur_mod)
|
|||||||
Prop p0;
|
Prop p0;
|
||||||
|
|
||||||
READ_LOCK(f->FRWLock);
|
READ_LOCK(f->FRWLock);
|
||||||
|
|
||||||
p0 = GetPredPropByFuncHavingLock(f, cur_mod);
|
p0 = GetPredPropByFuncHavingLock(f, cur_mod);
|
||||||
READ_UNLOCK(f->FRWLock);
|
READ_UNLOCK(f->FRWLock);
|
||||||
return (p0);
|
return (p0);
|
||||||
@ -646,8 +647,9 @@ Yap_NewPredPropByFunctor(FunctorEntry *fe, Term cur_mod)
|
|||||||
PredHash[hsh] = p;
|
PredHash[hsh] = p;
|
||||||
}
|
}
|
||||||
PredsInHashTable++;
|
PredsInHashTable++;
|
||||||
if (10*PredsInHashTable > 6*PredHashTableSize)
|
if (10*PredsInHashTable > 6*PredHashTableSize) {
|
||||||
ExpandPredHash();
|
ExpandPredHash();
|
||||||
|
}
|
||||||
WRITE_UNLOCK(PredHashRWLock);
|
WRITE_UNLOCK(PredHashRWLock);
|
||||||
/* make sure that we have something here */
|
/* make sure that we have something here */
|
||||||
RepPredProp(fe->PropsOfFE)->NextOfPE = fe->PropsOfFE;
|
RepPredProp(fe->PropsOfFE)->NextOfPE = fe->PropsOfFE;
|
||||||
|
@ -11,8 +11,11 @@
|
|||||||
* File: cdmgr.c *
|
* File: cdmgr.c *
|
||||||
* comments: Code manager *
|
* comments: Code manager *
|
||||||
* *
|
* *
|
||||||
* Last rev: $Date: 2007-10-29 22:48:54 $,$Author: vsc $ *
|
* Last rev: $Date: 2007-11-01 10:01:35 $,$Author: vsc $ *
|
||||||
* $Log: not supported by cvs2svn $
|
* $Log: not supported by cvs2svn $
|
||||||
|
* Revision 1.207 2007/10/29 22:48:54 vsc
|
||||||
|
* small fixes
|
||||||
|
*
|
||||||
* Revision 1.206 2007/04/10 22:13:20 vsc
|
* Revision 1.206 2007/04/10 22:13:20 vsc
|
||||||
* fix max modules limitation
|
* fix max modules limitation
|
||||||
*
|
*
|
||||||
@ -2193,9 +2196,9 @@ p_in_this_f_before(void)
|
|||||||
if (IsVarTerm(mod = Deref(ARG3)) || !IsAtomTerm(mod))
|
if (IsVarTerm(mod = Deref(ARG3)) || !IsAtomTerm(mod))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (arity)
|
if (arity)
|
||||||
p0 = PredPropByFunc(Yap_MkFunctor(at, arity),CurrentModule);
|
p0 = PredPropByFunc(Yap_MkFunctor(at, arity), mod);
|
||||||
else
|
else
|
||||||
p0 = PredPropByAtom(at, CurrentModule);
|
p0 = PredPropByAtom(at, mod);
|
||||||
if (ConsultSp == ConsultBase || (fp = ConsultSp)->p == p0)
|
if (ConsultSp == ConsultBase || (fp = ConsultSp)->p == p0)
|
||||||
return (FALSE);
|
return (FALSE);
|
||||||
else
|
else
|
||||||
|
1
C/init.c
1
C/init.c
@ -1391,6 +1391,7 @@ Yap_InitWorkspace(int Heap, int Stack, int Trail, int max_table_size,
|
|||||||
for (i = 0; i < PredHashTableSize; ++i) {
|
for (i = 0; i < PredHashTableSize; ++i) {
|
||||||
PredHash[i] = NULL;
|
PredHash[i] = NULL;
|
||||||
}
|
}
|
||||||
|
INIT_RWLOCK(PredHashRWLock);
|
||||||
NOfAtoms = 0;
|
NOfAtoms = 0;
|
||||||
NOfWideAtoms = 0;
|
NOfWideAtoms = 0;
|
||||||
PredsInHashTable = 0;
|
PredsInHashTable = 0;
|
||||||
|
@ -1322,9 +1322,9 @@ GetPredPropByFuncHavingLock (FunctorEntry *fe, Term cur_mod)
|
|||||||
{
|
{
|
||||||
PredEntry *p;
|
PredEntry *p;
|
||||||
|
|
||||||
if (!(p = RepPredProp(fe->PropsOfFE)))
|
if (!(p = RepPredProp(fe->PropsOfFE))) {
|
||||||
return NIL;
|
return NIL;
|
||||||
|
}
|
||||||
if ((p->ModuleOfPred == cur_mod || !(p->ModuleOfPred))) {
|
if ((p->ModuleOfPred == cur_mod || !(p->ModuleOfPred))) {
|
||||||
#if THREADS
|
#if THREADS
|
||||||
/* Thread Local Predicates */
|
/* Thread Local Predicates */
|
||||||
|
@ -17,6 +17,8 @@
|
|||||||
|
|
||||||
<h2>Yap-5.1.3:</h2>
|
<h2>Yap-5.1.3:</h2>
|
||||||
<ul>
|
<ul>
|
||||||
|
<li> FIXED: in_this_file_before should check predicate module, not
|
||||||
|
current module.</li>
|
||||||
<li> FIXED: overflow when copying constraints.</li>
|
<li> FIXED: overflow when copying constraints.</li>
|
||||||
<li> FIXED: MkBlob should try to allocate more space.</li>
|
<li> FIXED: MkBlob should try to allocate more space.</li>
|
||||||
<li> FIXED: make viterbi more efficient by not generating the whole graph.</li>
|
<li> FIXED: make viterbi more efficient by not generating the whole graph.</li>
|
||||||
|
@ -149,4 +149,3 @@ file_search_path(system, Dir) :-
|
|||||||
prolog_flag(host_type, Dir).
|
prolog_flag(host_type, Dir).
|
||||||
file_search_path(foreign, yap('lib/Yap')).
|
file_search_path(foreign, yap('lib/Yap')).
|
||||||
|
|
||||||
:- start_low_level_trace.
|
|
||||||
|
Reference in New Issue
Block a user