aboutsummaryrefslogtreecommitdiff
path: root/lib/std/Thread.zig
diff options
context:
space:
mode:
authorJacob Young <jacobly0@users.noreply.github.com>2024-07-07 13:18:53 -0400
committerJacob Young <jacobly0@users.noreply.github.com>2024-07-07 22:59:52 -0400
commit166402c16bddccc364b9108a9e69af3a0dd6f1ab (patch)
tree4557630cf8d32fbcf54e30c687819638615e122d /lib/std/Thread.zig
parentbdae01ab047accbbc6dcd014d008f2554aa78696 (diff)
downloadzig-166402c16bddccc364b9108a9e69af3a0dd6f1ab.tar.gz
zig-166402c16bddccc364b9108a9e69af3a0dd6f1ab.zip
bootstrap: fix build
Diffstat (limited to 'lib/std/Thread.zig')
-rw-r--r--lib/std/Thread.zig7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/std/Thread.zig b/lib/std/Thread.zig
index 5bfaef6127..25261053ee 100644
--- a/lib/std/Thread.zig
+++ b/lib/std/Thread.zig
@@ -280,12 +280,13 @@ pub fn getCurrentId() Id {
pub const CpuCountError = error{
PermissionDenied,
SystemResources,
+ Unsupported,
Unexpected,
};
/// Returns the platforms view on the number of logical CPU cores available.
pub fn getCpuCount() CpuCountError!usize {
- return Impl.getCpuCount();
+ return try Impl.getCpuCount();
}
/// Configuration options for hints on how to spawn threads.
@@ -782,6 +783,10 @@ const WasiThreadImpl = struct {
return tls_thread_id;
}
+ fn getCpuCount() error{Unsupported}!noreturn {
+ return error.Unsupported;
+ }
+
fn getHandle(self: Impl) ThreadHandle {
return self.thread.tid.load(.seq_cst);
}