Add more "contextless"

This commit is contained in:
gingerBill
2025-08-08 12:55:23 +01:00
parent a0462aa8d7
commit aa747a1c10
2 changed files with 8 additions and 4 deletions
+4 -2
View File
@@ -10,7 +10,9 @@ import "base:runtime"
version_string_buf: [1024]u8 version_string_buf: [1024]u8
@(init, private) @(init, private)
init_os_version :: proc () { init_os_version :: proc "contextless" () {
context = runtime.default_context()
when ODIN_OS == .NetBSD { when ODIN_OS == .NetBSD {
os_version.platform = .NetBSD os_version.platform = .NetBSD
} else { } else {
@@ -66,7 +68,7 @@ init_os_version :: proc () {
} }
@(init, private) @(init, private)
init_ram :: proc() { init_ram :: proc "contextless" () {
// Retrieve RAM info using `sysctl` // Retrieve RAM info using `sysctl`
mib := []i32{sys.CTL_HW, sys.HW_PHYSMEM64} mib := []i32{sys.CTL_HW, sys.HW_PHYSMEM64}
mem_size: u64 mem_size: u64
+4 -2
View File
@@ -9,7 +9,9 @@ import "base:runtime"
version_string_buf: [1024]u8 version_string_buf: [1024]u8
@(init, private) @(init, private)
init_os_version :: proc () { init_os_version :: proc "contextless" () {
context = runtime.default_context()
os_version.platform = .FreeBSD os_version.platform = .FreeBSD
kernel_version_buf: [1024]u8 kernel_version_buf: [1024]u8
@@ -68,7 +70,7 @@ init_os_version :: proc () {
} }
@(init, private) @(init, private)
init_ram :: proc() { init_ram :: proc "contextless" () {
// Retrieve RAM info using `sysctl` // Retrieve RAM info using `sysctl`
mib := []i32{sys.CTL_HW, sys.HW_PHYSMEM} mib := []i32{sys.CTL_HW, sys.HW_PHYSMEM}
mem_size: u64 mem_size: u64