From: cacao Date: Sun, 13 Dec 1998 20:33:44 +0000 (+0000) Subject: threading bugs fixed X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=commitdiff_plain;h=710a271ccb135655be96fd121dd9d42dd9c11fd9;p=cacao.git threading bugs fixed --- diff --git a/mm/heap2.c b/mm/heap2.c index abd4120d5..10ed06bf4 100644 --- a/mm/heap2.c +++ b/mm/heap2.c @@ -905,11 +905,15 @@ void gc_call (void) { #ifdef USE_THREADS + u1 dummy; + assert(blockInts == 0); intsDisable(); - if (currentThread == NULL || currentThread == mainThread) + if (currentThread == NULL || currentThread == mainThread) { + CONTEXT(mainThread).usedStackTop = &dummy; gc_run(); + } else asm_switchstackandcall(CONTEXT(mainThread).usedStackTop, gc_run, (void**)&(CONTEXT(currentThread).usedStackTop));