From f857af0c50f30d66ead4f25481174cb4dc468a5e Mon Sep 17 00:00:00 2001 From: vsc Date: Mon, 16 Feb 2004 15:37:16 +0000 Subject: [PATCH] I assumed PP would always be locked at try, but that is not true if the predicate is thread local. git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@990 b08c6af1-5177-4d33-ba66-4b1c6b8b522a --- C/absmi.c | 7 +++++-- C/tracer.c | 3 +++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/C/absmi.c b/C/absmi.c index 9bec5a3c3..82010076a 100644 --- a/C/absmi.c +++ b/C/absmi.c @@ -1152,8 +1152,11 @@ Yap_absmi(int inp) #endif UNLOCK(cl->ClLock); #if defined(YAPOR) || defined(THREADS) - READ_UNLOCK(PP->PRWLock); - PP = NULL; + if (PP) { + /* PP would be NULL for local preds */ + READ_UNLOCK(PP->PRWLock); + PP = NULL; + } #endif } GONext(); diff --git a/C/tracer.c b/C/tracer.c index 2e3ddab92..3163d149e 100644 --- a/C/tracer.c +++ b/C/tracer.c @@ -115,6 +115,9 @@ low_level_trace(yap_low_level_port port, PredEntry *pred, CELL *args) /* extern int gc_calls; */ vsc_count++; + if (vsc_count == 395950L) + vsc_xstop = 1; + return; #ifdef COMMENTED if (port != enter_pred || !pred ||