fixed compilation bug (Prof. Vitor Costa)

This commit is contained in:
Miguel Areias 2012-07-02 19:48:58 +01:00
parent fab462b002
commit bc21735ff1
3 changed files with 7 additions and 7 deletions

View File

@ -3256,21 +3256,20 @@ cont_current_predicate_for_atom( USES_REGS1 )
} }
p = RepPredProp(p->NextOfPE); p = RepPredProp(p->NextOfPE);
} }
READ_UNLOCK(PredHashRWLock);
} }
} }
READ_UNLOCK(pp->FRWLock); READ_UNLOCK(pp->FRWLock);
} else if (pp->KindOfPE == PEProp) { } else if (pp->KindOfPE == PEProp) {
PredEntry *pe = RepPredProp(pf); PredEntry *pe = RepPredProp(pf);
READ_LOCK(pp->FRWLock); PELOCK(31,pe);
if (pe->ModuleOfPred == mod || if (pe->ModuleOfPred == mod ||
pe->ModuleOfPred == 0) { pe->ModuleOfPred == 0) {
/* we found the predicate */ /* we found the predicate */
EXTRA_CBACK_ARG(3,1) = MkIntegerTerm((Int)(pp->NextOfPE)); EXTRA_CBACK_ARG(3,1) = MkIntegerTerm((Int)(pp->NextOfPE));
READ_UNLOCK(pp->FRWLock); UNLOCKPE(31,pe);
return Yap_unify(ARG3,MkIntTerm(0)); return Yap_unify(ARG3,MkIntTerm(0));
} }
READ_UNLOCK(pp->FRWLock); UNLOCKPE(31,pe);
} }
pf = pp->NextOfPE; pf = pp->NextOfPE;
} }

View File

@ -2,7 +2,8 @@
#define _YAP_INLINE_ONLY_H_ #define _YAP_INLINE_ONLY_H_
#ifdef __GNUC__ #ifdef __GNUC__
#define INLINE_ONLY __attribute__((gnu_inline,always_inline)) //#define INLINE_ONLY __attribute__((gnu_inline,always_inline))
#define INLINE_ONLY
#else #else
#define INLINE_ONLY #define INLINE_ONLY
#endif #endif

View File

@ -328,7 +328,7 @@ EXTERN inline UInt STD_PROTO(HashFunction, (unsigned char *)) INLINE_ONLY;
EXTERN inline UInt STD_PROTO(WideHashFunction, (wchar_t *)) INLINE_ONLY; EXTERN inline UInt STD_PROTO(WideHashFunction, (wchar_t *)) INLINE_ONLY;
EXTERN inline UInt EXTERN inline UInt
HashFunction(unsigned char *CHP) HashFunction(unsigned char *CHP) INLINE_ONLY
{ {
/* djb2 */ /* djb2 */
UInt hash = 5381; UInt hash = 5381;
@ -347,7 +347,7 @@ HashFunction(unsigned char *CHP)
} }
EXTERN inline UInt EXTERN inline UInt
WideHashFunction(wchar_t *CHP) WideHashFunction(wchar_t *CHP) INLINE_ONLY
{ {
UInt hash = 5381; UInt hash = 5381;
UInt c; UInt c;