fix locking issues with dynamic predicates and threads (obs from Paulo Moura).
This commit is contained in:
parent
fb6c4f966c
commit
3070e4ce9d
@ -8143,7 +8143,6 @@ Yap_absmi(int inp)
|
||||
PREG = pt0->CodeOfPred;
|
||||
/* for profiler */
|
||||
#ifdef THREADS
|
||||
pthread_mutex_lock(&(ThreadHandle[worker_id].tlock));
|
||||
UNLOCK(ThreadHandlesLock);
|
||||
#endif
|
||||
save_pc();
|
||||
|
6
C/exec.c
6
C/exec.c
@ -792,6 +792,12 @@ p_execute_nonstop(void)
|
||||
if (ActiveSignals & YAP_CREEP_SIGNAL && !Yap_InterruptsDisabled) {
|
||||
Yap_signal(YAP_CREEP_SIGNAL);
|
||||
}
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
if (RepPredProp(pe)->PredFlags & LogUpdatePredFlag) {
|
||||
PP = RepPredProp(pe);
|
||||
LOCK(PP->PELock);
|
||||
}
|
||||
#endif
|
||||
return CallPredicate(RepPredProp(pe), B, RepPredProp(pe)->cs.p_code.TrueCodeOfPred);
|
||||
} else { if (ActiveSignals & YAP_CREEP_SIGNAL &&
|
||||
!Yap_InterruptsDisabled &&
|
||||
|
Reference in New Issue
Block a user