aboutsummaryrefslogtreecommitdiff
path: root/lib/std/Thread/StaticResetEvent.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2021-06-21 20:20:48 -0400
committerGitHub <noreply@github.com>2021-06-21 20:20:48 -0400
commitc6844072ce440f581787bf97909261084a9edc6c (patch)
treeb0cade24a1ee14777be05644c19d76d158c3ab29 /lib/std/Thread/StaticResetEvent.zig
parent8a6de78e0787015153707361a58659834d4c39c2 (diff)
parent7bebb24838a603a436b58e49ee85110af9e8e05f (diff)
downloadzig-c6844072ce440f581787bf97909261084a9edc6c.tar.gz
zig-c6844072ce440f581787bf97909261084a9edc6c.zip
Merge pull request #9047 from g-w1/spider-astgen
stage2 astgen: catch unused vars
Diffstat (limited to 'lib/std/Thread/StaticResetEvent.zig')
-rw-r--r--lib/std/Thread/StaticResetEvent.zig7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/std/Thread/StaticResetEvent.zig b/lib/std/Thread/StaticResetEvent.zig
index 0a6a1d568e..6f869e0d89 100644
--- a/lib/std/Thread/StaticResetEvent.zig
+++ b/lib/std/Thread/StaticResetEvent.zig
@@ -105,6 +105,7 @@ pub const DebugEvent = struct {
}
pub fn timedWait(ev: *DebugEvent, timeout: u64) TimedWaitResult {
+ _ = timeout;
switch (ev.state) {
.unset => return .timed_out,
.set => return .event_set,
@@ -174,7 +175,10 @@ pub const AtomicEvent = struct {
};
pub const SpinFutex = struct {
- fn wake(waiters: *u32, wake_count: u32) void {}
+ fn wake(waiters: *u32, wake_count: u32) void {
+ _ = waiters;
+ _ = wake_count;
+ }
fn wait(waiters: *u32, timeout: ?u64) !void {
var timer: time.Timer = undefined;
@@ -193,6 +197,7 @@ pub const AtomicEvent = struct {
pub const LinuxFutex = struct {
fn wake(waiters: *u32, wake_count: u32) void {
+ _ = wake_count;
const waiting = std.math.maxInt(i32); // wake_count
const ptr = @ptrCast(*const i32, waiters);
const rc = linux.futex_wake(ptr, linux.FUTEX_WAKE | linux.FUTEX_PRIVATE_FLAG, waiting);