mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 07:38:48 +00:00
Add more "contextless"
This commit is contained in:
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user