summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--lib/system.nim2
-rw-r--r--lib/system/gc_common.nim2
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