mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-03 03:32:32 +00:00
__NR_gettid as const on amd64 (#7460)
This commit is contained in:
committed by
Andreas Rumpf
parent
e336e6609c
commit
4d6456d029
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user