summary refs log tree commit diff stats
path: root/lib/system/gc.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2011-06-26 17:21:52 +0200
committerAraq <rumpf_a@web.de>2011-06-26 17:21:52 +0200
commit990dc2d7152f09c413d8fd96d66484d79aec97c7 (patch)
treea267c16996c61292c78019ab56d1116d811fd0dc /lib/system/gc.nim
parentdb0a4a9f86d167faccbd50f3f12f9de470e516b8 (diff)
downloadNim-990dc2d7152f09c413d8fd96d66484d79aec97c7.tar.gz
code gen bugfixes; marshal.nim implemented
Diffstat (limited to 'lib/system/gc.nim')
-rwxr-xr-xlib/system/gc.nim8
1 files changed, 4 insertions, 4 deletions
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.} =