Add cpuRelax assembler for other platforms
This commit is contained in:
parent
08c0ba379a
commit
ddeefe85d2
1 changed files with 57 additions and 54 deletions
|
|
@ -206,6 +206,9 @@ else:
|
|||
when (defined(x86) or defined(amd64)) and someGcc:
|
||||
proc cpuRelax* {.inline.} =
|
||||
{.emit: """asm volatile("pause" ::: "memory");""".}
|
||||
elif someGcc:
|
||||
proc cpuRelax* {.inline.} =
|
||||
{.emit: """asm volatile("" ::: "memory");""".}
|
||||
elif (defined(x86) or defined(amd64)) and defined(vcc):
|
||||
proc cpuRelax* {.importc: "YieldProcessor", header: "<windows.h>".}
|
||||
elif defined(icl):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue