Fixed mutex usage in SharedList and SharedTable. Closes #6988 (#6990)

This commit is contained in:
Yuriy Glukhov 2017-12-31 11:28:51 +03:00 • committed by Andreas Rumpf
commit d1e10f9aa3
6 changed files with 31 additions and 13 deletions

View file

@ -318,7 +318,7 @@ proc initGC() =
init(gch.marked)
init(gch.additionalRoots)
when hasThreadSupport:
gch.toDispose = initSharedList[pointer]()
init(gch.toDispose)
when useMarkForDebug or useBackupGc:
type

View file

@ -133,7 +133,7 @@ proc initGC() =
init(gch.additionalRoots)
init(gch.greyStack)
when hasThreadSupport:
gch.toDispose = initSharedList[pointer]()
init(gch.toDispose)
# Which color to use for new objects is tricky: When we're marking,
# they have to be *white* so that everything is marked that is only

View file

@ -233,7 +233,7 @@ proc initGC() =
init(gch.allocated)
init(gch.marked)
when hasThreadSupport:
gch.toDispose = initSharedList[pointer]()
init(gch.toDispose)
proc forAllSlotsAux(dest: pointer, n: ptr TNimNode, op: WalkOp) {.benign.} =
var d = cast[ByteAddress](dest)