fixes for threads to compile and boot.

This commit is contained in:
Vitor Santos Costa
2009-03-24 13:27:36 +00:00
parent 0391b3ce25
commit 4b65b063ca
4 changed files with 41 additions and 31 deletions

View File

@@ -14,7 +14,6 @@
*************************************************************************/
/* information that can be stored in Code Space */
#include <stdio.h>
#ifndef HEAP_H
#define HEAP_H 1
@@ -814,27 +813,4 @@ Yap_PreAllocCodeSpace(void)
return Yap_InitPreAllocCodeSpace();
}
#ifdef ATOMS_H
#ifdef THREADS
Prop STD_PROTO(Yap_NewThreadPred, (struct pred_entry *));
Prop STD_PROTO(Yap_NewPredPropByFunctor, (Functor, Term));
EXTERN inline PredEntry *
Yap_GetThreadPred(struct pred_entry *ap)
{
Functor f = ap->FunctorOfPred;
Term mod = ap->ModuleOfPred;
Prop p0 = AbsPredProp(Yap_heap_regs->thread_handle[worker_id].local_preds);
while(p0) {
PredEntry *ap = RepPredProp(p0);
if (ap->FunctorOfPred == f &&
ap->ModuleOfPred == mod) return ap;
p0 = ap->NextOfPE;
}
return RepPredProp(Yap_NewThreadPred(ap));
}
#endif
#endif
#endif /* HEAP_H */