mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-31 20:00:09 +00:00
Require @(init) and @(fini) to be proc "contextless" ()
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user