diff options
Diffstat (limited to 'lib/system/threads.nim')
-rw-r--r-- | lib/system/threads.nim | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/system/threads.nim b/lib/system/threads.nim index f61cc4280..861bde13f 100644 --- a/lib/system/threads.nim +++ b/lib/system/threads.nim @@ -440,7 +440,7 @@ proc threadProcWrapStackFrame[TArg](thrd: ptr Thread[TArg]) = threadProcWrapDispatch[TArg] when not hasSharedHeap: # init the GC for refc/markandsweep - setStackBottom(addr(p)) + nimGC_setStackBottom(addr(p)) initGC() when declared(threadType): threadType = ThreadType.NimThread @@ -642,7 +642,10 @@ when defined(windows): elif defined(linux): proc syscall(arg: clong): clong {.varargs, importc: "syscall", header: "<unistd.h>".} - var NR_gettid {.importc: "__NR_gettid", header: "<sys/syscall.h>".}: int + when defined(amd64): + const NR_gettid = clong(186) + else: + var NR_gettid {.importc: "__NR_gettid", header: "<sys/syscall.h>".}: clong proc getThreadId*(): int = ## get the ID of the currently running thread. |