std.Thread: uh more typo fixes

This commit is contained in:
kprotty 2021-06-20 17:12:28 -05:00
parent d016caaccb
commit b1f37b4ead

View File

@ -206,7 +206,7 @@ const WindowsThreadImpl = struct {
pub const ThreadHandle = windows.HANDLE; pub const ThreadHandle = windows.HANDLE;
fn getCurrentId() u64 { fn getCurrentId() u64 {
return windows.kernel.GetCurrentThreadId(); return windows.kernel32.GetCurrentThreadId();
} }
fn getCpuCount() !usize { fn getCpuCount() !usize {
@ -266,7 +266,7 @@ const WindowsThreadImpl = struct {
var stack_size = std.math.cast(u32, config.stack_size) catch std.math.maxInt(u32); var stack_size = std.math.cast(u32, config.stack_size) catch std.math.maxInt(u32);
stack_size = std.math.max(64 * 1024, stack_size); stack_size = std.math.max(64 * 1024, stack_size);
instance.thread.thread_handle = windows.CreateThread( instance.thread.thread_handle = windows.kernel32.CreateThread(
null, null,
stack_size, stack_size,
Instance.entry, Instance.entry,
@ -406,7 +406,7 @@ const PosixThreadImpl = struct {
os.EAGAIN => error.SystemResources, os.EAGAIN => error.SystemResources,
os.EPERM => unreachable, os.EPERM => unreachable,
os.EINVAL => unreachable, os.EINVAL => unreachable,
else => os.unexpectedErrno(err), else => |err| os.unexpectedErrno(err),
}; };
} }