diff options
author | dom96 <dominikpicheta@googlemail.com> | 2011-01-28 00:07:08 +0000 |
---|---|---|
committer | dom96 <dominikpicheta@googlemail.com> | 2011-01-28 00:07:08 +0000 |
commit | 557adbcaac45d7b9c92904349c6cc3a7a8282ed7 (patch) | |
tree | fe099c599b674643bb61ed5da5043c3e56b48826 /lib/system/gc.nim | |
parent | 4b7ff3e0902c92b3483bd1000a8d4fb3f2bf8077 (diff) | |
parent | 408eb6bbe76e9e1b0651d07467ce2ba9510deb23 (diff) | |
download | Nim-557adbcaac45d7b9c92904349c6cc3a7a8282ed7.tar.gz |
Merge branch 'master' of github.com:Araq/Nimrod
Diffstat (limited to 'lib/system/gc.nim')
-rwxr-xr-x | lib/system/gc.nim | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/system/gc.nim b/lib/system/gc.nim index 72ae84096..c5bd56b99 100755 --- a/lib/system/gc.nim +++ b/lib/system/gc.nim @@ -61,8 +61,9 @@ type decStack: TCellSeq # cells in the stack that are to decref again cycleRoots: TCellSet tempStack: TCellSeq # temporary stack for recursion elimination - cycleRootsLock: TSysLock - zctLock: TSysLock + when hasThreadSupport: + cycleRootsLock: TSysLock + zctLock: TSysLock stat: TGcStat var @@ -281,8 +282,9 @@ proc initGC() = init(gch.tempStack) Init(gch.cycleRoots) Init(gch.decStack) - InitLock(gch.cycleRootsLock) - InitLock(gch.zctLock) + when hasThreadSupport: + InitLock(gch.cycleRootsLock) + InitLock(gch.zctLock) new(gOutOfMem) # reserve space for the EOutOfMemory exception here! proc forAllSlotsAux(dest: pointer, n: ptr TNimNode, op: TWalkOp) = |