mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-19 05:50:30 +00:00
Merge pull request #9065 from alaviss/haiku-32bit-fix
cpuinfo: fix compilation for 32bit Haiku
This commit is contained in:
@@ -44,12 +44,12 @@ when defined(genode):
|
||||
importcpp: "@->cpu().affinity_space().total()".}
|
||||
|
||||
when defined(haiku):
|
||||
{.emit: "#include <OS.h>".}
|
||||
type
|
||||
SystemInfo {.importc: "system_info", bycopy.} = object
|
||||
SystemInfo {.importc: "system_info", header: "<OS.h>".} = object
|
||||
cpuCount {.importc: "cpu_count".}: uint32
|
||||
|
||||
proc getSystemInfo(info: ptr SystemInfo): int32 {.importc: "get_system_info".}
|
||||
proc getSystemInfo(info: ptr SystemInfo): int32 {.importc: "get_system_info",
|
||||
header: "<OS.h>".}
|
||||
|
||||
proc countProcessors*(): int {.rtl, extern: "ncpi$1".} =
|
||||
## returns the numer of the processors/cores the machine has.
|
||||
|
||||
Reference in New Issue
Block a user