aboutsummaryrefslogtreecommitdiff
path: root/lib/std/spinlock.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2020-02-29 01:57:06 -0500
committerGitHub <noreply@github.com>2020-02-29 01:57:06 -0500
commit76176104001420ea04840f9b31e706289e4ebf11 (patch)
tree4ba46044adc883630a3452b33f9d70541581d7ae /lib/std/spinlock.zig
parent1b41f2d77ea14de27b0655a35a727d664cfc4ca4 (diff)
parent3cba603eae1a1c8b0338f5584041c73d55682c0a (diff)
downloadzig-76176104001420ea04840f9b31e706289e4ebf11.tar.gz
zig-76176104001420ea04840f9b31e706289e4ebf11.zip
Merge pull request #4550 from ziglang/os-version-ranges
introduce operating system version ranges as part of the target; self-host native dynamic linker detection and native glibc version detection
Diffstat (limited to 'lib/std/spinlock.zig')
-rw-r--r--lib/std/spinlock.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/std/spinlock.zig b/lib/std/spinlock.zig
index 1a3239a95c..0af08e9a84 100644
--- a/lib/std/spinlock.zig
+++ b/lib/std/spinlock.zig
@@ -46,7 +46,7 @@ pub const SpinLock = struct {
// and yielding for 380-410 iterations was found to be
// a nice sweet spot. Posix systems on the other hand,
// especially linux, perform better by yielding the thread.
- switch (builtin.os) {
+ switch (builtin.os.tag) {
.windows => loopHint(400),
else => std.os.sched_yield() catch loopHint(1),
}