deadlock avoidance.

This commit is contained in:
Vítor Santos Costa 2014-04-28 11:47:53 +01:00
parent 2f852223ec
commit 6bcda04a52
2 changed files with 3 additions and 3 deletions

View File

@ -1825,7 +1825,7 @@ int
Yap_locked_growtrail(long size, int contiguous_only)
{
CACHE_REGS
return do_growtrail(size, contiguous_only, FALSE, NULL, NULL, NULL PASS_REGS);
return do_growtrail(size, contiguous_only, FALSE, NULL, NULL, NULL PASS_REGS);
}
int

View File

@ -3992,7 +3992,7 @@ do_gc(Int predarity, CELL *current_env, yamop *nextop USES_REGS)
#if !USE_SYSTEM_MALLOC
if (HeapTop >= LOCAL_GlobalBase - MinHeapGap) {
*--ASP = (CELL)current_env;
if (!Yap_growheap(FALSE, MinHeapGap, NULL)) {
if (!Yap_locked_growheap(FALSE, MinHeapGap, NULL)) {
Yap_Error(OUT_OF_HEAP_ERROR, TermNil, LOCAL_ErrorMessage);
return -1;
}
@ -4014,7 +4014,7 @@ do_gc(Int predarity, CELL *current_env, yamop *nextop USES_REGS)
*--ASP = (CELL)current_env;
if (
!Yap_growtrail(sz, FALSE)
!Yap_locked_growtrail(sz, FALSE)
) {
Yap_Error(OUT_OF_TRAIL_ERROR,TermNil,"out of %lB during gc", sz);
return -1;