From 990dc2d7152f09c413d8fd96d66484d79aec97c7 Mon Sep 17 00:00:00 2001 From: Araq Date: Sun, 26 Jun 2011 17:21:52 +0200 Subject: code gen bugfixes; marshal.nim implemented --- lib/system/gc.nim | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/system/gc.nim') diff --git a/lib/system/gc.nim b/lib/system/gc.nim index 033a7bdbe..619b1c9b1 100755 --- a/lib/system/gc.nim +++ b/lib/system/gc.nim @@ -198,18 +198,18 @@ proc prepareDealloc(cell: PCell) = proc rtlAddCycleRoot(c: PCell) {.rtl, inl.} = # we MUST access gch as a global here, because this crosses DLL boundaries! - when hasThreadSupport: + when hasThreadSupport and hasSharedHeap: AcquireSys(HeapLock) incl(gch.cycleRoots, c) - when hasThreadSupport: + when hasThreadSupport and hasSharedHeap: ReleaseSys(HeapLock) proc rtlAddZCT(c: PCell) {.rtl, inl.} = # we MUST access gch as a global here, because this crosses DLL boundaries! - when hasThreadSupport: + when hasThreadSupport and hasSharedHeap: AcquireSys(HeapLock) addZCT(gch.zct, c) - when hasThreadSupport: + when hasThreadSupport and hasSharedHeap: ReleaseSys(HeapLock) proc decRef(c: PCell) {.inline.} = -- cgit 1.4.1-2-gfad0