From 13421d0cd7d54d227f1186533db0e20c86e26d8e Mon Sep 17 00:00:00 2001 From: Vitor Santos Costa Date: Sun, 19 Oct 2014 03:51:56 +0100 Subject: [PATCH] fix minor locking problems and disable localization for now --- H/Yatom.h | 5 ++++- H/pl-shared.h | 2 +- OPTYap/locks_pthread.h | 2 +- os/pl-stream.c | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/H/Yatom.h b/H/Yatom.h index a3b1df57e..be02258a8 100755 --- a/H/Yatom.h +++ b/H/Yatom.h @@ -1789,9 +1789,12 @@ PredPropByAtomAndMod (Atom at, Term cur_mod) { LOCK((Z)->PELock); (Z)->StatisticsForPred.NOfEntries=(I);(Z)->StatisticsForPred.NOfHeadSuccesses=pthread_self(); } #define UNLOCKPE(I,Z) \ ( (Z)->StatisticsForPred.NOfRetries=(I), UNLOCK((Z)->PELock) ) -#else +#elif YAPOR || THREADS #define PELOCK(I,Z) (LOCK((Z)->PELock)) #define UNLOCKPE(I,Z) (UNLOCK((Z)->PELock)) +#else +#define PELOCK(I,Z) +#define UNLOCKPE(I,Z) #endif INLINE_ONLY EXTERN inline void AddPropToAtom(AtomEntry *, PropEntry *p); diff --git a/H/pl-shared.h b/H/pl-shared.h index e821e5731..baebda8ec 100755 --- a/H/pl-shared.h +++ b/H/pl-shared.h @@ -33,7 +33,7 @@ #define O_STRING 1 #define O_QUASIQUOTATIONS 1 #if HAVE_LOCALE_H && HAVE_SETLOCALE -#define O_LOCALE 1 +//#define O_LOCALE 1 #endif //#define O_ATOMGC 1 //#define O_CLAUSEGC 1 diff --git a/OPTYap/locks_pthread.h b/OPTYap/locks_pthread.h index de9579921..355d125f1 100755 --- a/OPTYap/locks_pthread.h +++ b/OPTYap/locks_pthread.h @@ -21,7 +21,7 @@ #include -#define DEBUG_PE_LOCKS 1 +//#define DEBUG_PE_LOCKS 1 //#define DEBUG_LOCKS #include diff --git a/os/pl-stream.c b/os/pl-stream.c index 1caaf5f1e..7ee6ba97c 100755 --- a/os/pl-stream.c +++ b/os/pl-stream.c @@ -70,7 +70,7 @@ locking is required. #define PL_KERNEL 1 #if HAVE_LOCALE_H && HAVE_SETLOCALE -#define O_LOCALE 1 +//#define O_LOCALE 1 #endif #include #define NEEDS_SWINSOCK