diff options
author | Anatoly Galiulin <galiulin.anatoly@gmail.com> | 2017-02-08 16:26:15 +0700 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2017-02-08 10:26:15 +0100 |
commit | 61b4bb5af5588b95a9b050e9925960ead87b0ea1 (patch) | |
tree | 9e648c9711fbcf0b6c1709bb499433a968d76e0f /lib | |
parent | ca39e113d5d237f239f2334eaa5cab3c8efac979 (diff) | |
download | Nim-61b4bb5af5588b95a9b050e9925960ead87b0ea1.tar.gz |
Mark setupForeignThreadGc and initGC as gcsafe (#5353)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/system.nim | 2 | ||||
-rw-r--r-- | lib/system/gc_common.nim | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/system.nim b/lib/system.nim index 09d48fd12..5d17f7651 100644 --- a/lib/system.nim +++ b/lib/system.nim @@ -2630,7 +2630,7 @@ when not defined(JS): #and not defined(nimscript): when hasAlloc: when not defined(gcStack): - proc initGC() + proc initGC() {.gcsafe.} when not defined(boehmgc) and not defined(useMalloc) and not defined(gogc) and not defined(gcStack): proc initAllocator() {.inline.} diff --git a/lib/system/gc_common.nim b/lib/system/gc_common.nim index aec8b67cb..8f9d1edb6 100644 --- a/lib/system/gc_common.nim +++ b/lib/system/gc_common.nim @@ -135,7 +135,7 @@ when allowForeignThreadGc: var localGcInitialized {.rtlThreadVar.}: bool - proc setupForeignThreadGc*() = + proc setupForeignThreadGc*() {.gcsafe.} = ## Call this if you registered a callback that will be run from a thread not ## under your control. This has a cheap thread-local guard, so the GC for ## this thread will only be initialized once per thread, no matter how often |