__NR_gettid as const on amd64 (#7460)
This commit is contained in:
parent
e336e6609c
commit
4d6456d029
1 changed files with 4 additions and 1 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue