aboutsummaryrefslogtreecommitdiff
path: root/lib/std/Thread
diff options
context:
space:
mode:
authorChris Boesch <48591413+chrboesch@users.noreply.github.com>2025-02-01 07:53:57 +0100
committerGitHub <noreply@github.com>2025-02-01 06:53:57 +0000
commit58c00a829e8acf438b91e9f7e1729ce79be722fa (patch)
tree21a7941f28fe1aea30c2591d116ad09334b34c8d /lib/std/Thread
parentc44be99f1abff2ab67d69964efecca380b96219e (diff)
downloadzig-58c00a829e8acf438b91e9f7e1729ce79be722fa.tar.gz
zig-58c00a829e8acf438b91e9f7e1729ce79be722fa.zip
std.posix: Use separate clock ID enums for clock_gettime() and timerfd_create() (#22627)
Diffstat (limited to 'lib/std/Thread')
-rw-r--r--lib/std/Thread/Futex.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/std/Thread/Futex.zig b/lib/std/Thread/Futex.zig
index fc02b8407c..c18caec7a6 100644
--- a/lib/std/Thread/Futex.zig
+++ b/lib/std/Thread/Futex.zig
@@ -543,7 +543,7 @@ const PosixImpl = struct {
// This can be changed with pthread_condattr_setclock, but it's an extension and may not be available everywhere.
var ts: c.timespec = undefined;
if (timeout) |timeout_ns| {
- std.posix.clock_gettime(c.CLOCK.REALTIME, &ts) catch unreachable;
+ ts = std.posix.clock_gettime(c.CLOCK.REALTIME) catch unreachable;
ts.sec +|= @as(@TypeOf(ts.sec), @intCast(timeout_ns / std.time.ns_per_s));
ts.nsec += @as(@TypeOf(ts.nsec), @intCast(timeout_ns % std.time.ns_per_s));