conditional compilation of thread inlines

This commit is contained in:
Vitor Santos Costa 2009-03-13 12:06:57 +00:00
parent 8b118f1778
commit a1b58f61e0
2 changed files with 9 additions and 2 deletions

View File

@ -15,6 +15,9 @@
* * * *
*************************************************************************/ *************************************************************************/
#ifndef ATOMS_H
#define ATOMS_H 1
#undef EXTERN #undef EXTERN
#ifndef ADTDEFS_C #ifndef ADTDEFS_C
#define EXTERN static #define EXTERN static
@ -114,3 +117,5 @@ typedef struct FunctorEntryStruct
} FunctorEntry; } FunctorEntry;
typedef FunctorEntry *Functor; typedef FunctorEntry *Functor;
#endif /* ATOMS_H */

View File

@ -811,12 +811,13 @@ Yap_PreAllocCodeSpace(void)
return Yap_InitPreAllocCodeSpace(); return Yap_InitPreAllocCodeSpace();
} }
#ifdef ATOMS_H
#ifdef THREADS #ifdef THREADS
Prop STD_PROTO(Yap_NewThreadPred, (PredEntry *)); Prop STD_PROTO(Yap_NewThreadPred, (struct pred_entry *));
Prop STD_PROTO(Yap_NewPredPropByFunctor, (Functor, Term)); Prop STD_PROTO(Yap_NewPredPropByFunctor, (Functor, Term));
EXTERN inline PredEntry * EXTERN inline PredEntry *
Yap_GetThreadPred(PredEntry *ap) Yap_GetThreadPred(struct pred_entry *ap)
{ {
Functor f = ap->FunctorOfPred; Functor f = ap->FunctorOfPred;
Term mod = ap->ModuleOfPred; Term mod = ap->ModuleOfPred;
@ -831,5 +832,6 @@ Yap_GetThreadPred(PredEntry *ap)
return RepPredProp(Yap_NewThreadPred(ap)); return RepPredProp(Yap_NewThreadPred(ap));
} }
#endif #endif
#endif
#endif /* HEAP_H */ #endif /* HEAP_H */