diff options
| author | gingerBill <gingerBill@users.noreply.github.com> | 2025-08-08 12:10:01 +0100 |
|---|---|---|
| committer | gingerBill <gingerBill@users.noreply.github.com> | 2025-08-08 12:10:01 +0100 |
| commit | 7642e0a0e0bb0ff79da6ac7a2ba3b787afa32b78 (patch) | |
| tree | aec4baaf441f58b3c6c9a8a55c61e5f8c6218f4b /core/sys/info/cpu_linux_intel.odin | |
| parent | 3194fda8f3b01affc086eec4102d924277fe9f43 (diff) | |
Require `@(init)` and `@(fini)` to be `proc "contextless" ()`
Diffstat (limited to 'core/sys/info/cpu_linux_intel.odin')
| -rw-r--r-- | core/sys/info/cpu_linux_intel.odin | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/core/sys/info/cpu_linux_intel.odin b/core/sys/info/cpu_linux_intel.odin index e43737475..af76a75e4 100644 --- a/core/sys/info/cpu_linux_intel.odin +++ b/core/sys/info/cpu_linux_intel.odin @@ -2,12 +2,15 @@ #+build linux package sysinfo +import "base:runtime" import "core:sys/linux" import "core:strings" import "core:strconv" @(init, private) -init_cpu_core_count :: proc() { +init_cpu_core_count :: proc "contextless" () { + context = runtime.default_context() + fd, err := linux.open("/proc/cpuinfo", {}) if err != .NONE { return } defer linux.close(fd) |