From ba6d46578b52545f5ce3e7c272f8b599a1caddf7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADtor=20Santos=20Costa?= Date: Thu, 12 Jun 2014 01:24:10 +0100 Subject: [PATCH] fix deadlock --- C/heapgc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/C/heapgc.c b/C/heapgc.c index 0bec346d5..4965d2ebc 100755 --- a/C/heapgc.c +++ b/C/heapgc.c @@ -111,7 +111,7 @@ gc_growtrail(int committed, tr_fr_ptr begsTR, cont *old_cont_top0 USES_REGS) /* ask for double the size */ sz = 2*sz; - if (!Yap_growtrail(sz, TRUE)) { + if (!Yap_locked_growtrail(sz, TRUE)) { #ifdef EASY_SHUNTING if (begsTR) { LOCAL_sTR = (tr_fr_ptr)old_cont_top0; @@ -386,7 +386,7 @@ static void check_pr_trail(tr_fr_ptr trp USES_REGS) { if ((tr_fr_ptr)LOCAL_TrailTop-TR < 1024) { - if (!Yap_growtrail(0, TRUE) || TRUE) { + if (!Yap_locked_growtrail(0, TRUE) || TRUE) { /* could not find more trail */ save_machine_regs(); siglongjmp(LOCAL_gc_restore, 2);