From bc21735ff1488ebd835dd28bb52aae01e43c7235 Mon Sep 17 00:00:00 2001 From: Miguel Areias Date: Mon, 2 Jul 2012 19:48:58 +0100 Subject: [PATCH] fixed compilation bug (Prof. Vitor Costa) --- C/stdpreds.c | 7 +++---- H/inline-only.h | 3 ++- H/yapio.h | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/C/stdpreds.c b/C/stdpreds.c index 31f2a6468..02a24562a 100644 --- a/C/stdpreds.c +++ b/C/stdpreds.c @@ -3256,21 +3256,20 @@ cont_current_predicate_for_atom( USES_REGS1 ) } p = RepPredProp(p->NextOfPE); } - READ_UNLOCK(PredHashRWLock); } } READ_UNLOCK(pp->FRWLock); } else if (pp->KindOfPE == PEProp) { PredEntry *pe = RepPredProp(pf); - READ_LOCK(pp->FRWLock); + PELOCK(31,pe); if (pe->ModuleOfPred == mod || pe->ModuleOfPred == 0) { /* we found the predicate */ EXTRA_CBACK_ARG(3,1) = MkIntegerTerm((Int)(pp->NextOfPE)); - READ_UNLOCK(pp->FRWLock); + UNLOCKPE(31,pe); return Yap_unify(ARG3,MkIntTerm(0)); } - READ_UNLOCK(pp->FRWLock); + UNLOCKPE(31,pe); } pf = pp->NextOfPE; } diff --git a/H/inline-only.h b/H/inline-only.h index 5e5c77847..7ffc36bf6 100644 --- a/H/inline-only.h +++ b/H/inline-only.h @@ -2,7 +2,8 @@ #define _YAP_INLINE_ONLY_H_ #ifdef __GNUC__ -#define INLINE_ONLY __attribute__((gnu_inline,always_inline)) +//#define INLINE_ONLY __attribute__((gnu_inline,always_inline)) +#define INLINE_ONLY #else #define INLINE_ONLY #endif diff --git a/H/yapio.h b/H/yapio.h index 7173f0542..bc60121f6 100644 --- a/H/yapio.h +++ b/H/yapio.h @@ -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 -HashFunction(unsigned char *CHP) +HashFunction(unsigned char *CHP) INLINE_ONLY { /* djb2 */ UInt hash = 5381; @@ -347,7 +347,7 @@ HashFunction(unsigned char *CHP) } EXTERN inline UInt -WideHashFunction(wchar_t *CHP) +WideHashFunction(wchar_t *CHP) INLINE_ONLY { UInt hash = 5381; UInt c;