Merge pull request #9065 from alaviss/haiku-32bit-fix

cpuinfo: fix compilation for 32bit Haiku
This commit is contained in:
Andreas Rumpf
2018-09-25 12:13:11 +02:00
committed by GitHub

View File

@@ -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.