mirror of
https://github.com/ziglang/zig.git
synced 2026-01-11 01:45:12 +00:00
Use system instead of builtin.link_libc
This commit is contained in:
parent
12e68cbeb6
commit
bb4abfdc78
@ -3171,11 +3171,8 @@ pub fn dn_expand(
|
||||
}
|
||||
|
||||
pub fn sched_yield() void {
|
||||
if (builtin.os == .windows) {
|
||||
_ = windows.kernel32.SwitchToThread();
|
||||
} else if (builtin.os == .linux and !builtin.link_libc) {
|
||||
assert(linux.sched_yield() == 0);
|
||||
} else if (builtin.link_libc) {
|
||||
assert(std.c.sched_yield() == 0);
|
||||
switch (builtin.os) {
|
||||
.windows => _ = windows.kernel32.SwitchToThread(),
|
||||
else => assert(system.sched_yield() == 0),
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user