mirror of
https://github.com/odin-lang/Odin.git
synced 2026-04-19 13:00:28 +00:00
Add missing contextless
This commit is contained in:
@@ -81,7 +81,7 @@ init_cpu_features :: proc "contextless" () {
|
||||
}
|
||||
err := linux.riscv_hwprobe(raw_data(pairs), len(pairs), 0, nil, {})
|
||||
if err != nil {
|
||||
assert(err == .ENOSYS, "unexpected error from riscv_hwprobe()")
|
||||
assert_contextless(err == .ENOSYS, "unexpected error from riscv_hwprobe()")
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ foreign libc {
|
||||
@(link_name="sysctl") _unix_sysctl :: proc(name: [^]i32, namelen: u32, oldp: rawptr, oldlenp: ^c.size_t, newp: rawptr, newlen: c.size_t) -> i32 ---
|
||||
}
|
||||
|
||||
sysctl :: proc(mib: []i32, val: ^$T) -> (ok: bool) {
|
||||
sysctl :: proc "contextless" (mib: []i32, val: ^$T) -> (ok: bool) {
|
||||
mib := mib
|
||||
result_size := c.size_t(size_of(T))
|
||||
res := _unix_sysctl(raw_data(mib), u32(len(mib)), val, &result_size, nil, 0)
|
||||
|
||||
Reference in New Issue
Block a user