aboutsummaryrefslogtreecommitdiff
path: root/lib/std/Thread/Futex.zig
diff options
context:
space:
mode:
authorJacob Young <jacobly0@users.noreply.github.com>2024-03-19 12:46:38 +0100
committerJacob Young <jacobly0@users.noreply.github.com>2024-03-30 20:50:48 -0400
commiteb723a407073592db858cf14bece8643bec2a771 (patch)
tree504be71818a397d2b8ce07aa26718b5c7a5b7ef5 /lib/std/Thread/Futex.zig
parent17673dcd6e3ffeb25fc9dc1cfc72334ab4e71b37 (diff)
downloadzig-eb723a407073592db858cf14bece8643bec2a771.tar.gz
zig-eb723a407073592db858cf14bece8643bec2a771.zip
Update uses of `@fieldParentPtr` to use RLS
Diffstat (limited to 'lib/std/Thread/Futex.zig')
-rw-r--r--lib/std/Thread/Futex.zig6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/std/Thread/Futex.zig b/lib/std/Thread/Futex.zig
index 39afe249d1..4bbe1f6293 100644
--- a/lib/std/Thread/Futex.zig
+++ b/lib/std/Thread/Futex.zig
@@ -644,7 +644,7 @@ const PosixImpl = struct {
};
// There's a wait queue on the address; get the queue head and tail.
- const head = @fieldParentPtr(Waiter, "node", entry_node);
+ const head: *Waiter = @fieldParentPtr("node", entry_node);
const tail = head.tail orelse unreachable;
// Push the waiter to the tail by replacing it and linking to the previous tail.
@@ -656,7 +656,7 @@ const PosixImpl = struct {
fn remove(treap: *Treap, address: usize, max_waiters: usize) WaitList {
// Find the wait queue associated with this address and get the head/tail if any.
var entry = treap.getEntryFor(address);
- var queue_head = if (entry.node) |node| @fieldParentPtr(Waiter, "node", node) else null;
+ var queue_head: ?*Waiter = if (entry.node) |node| @fieldParentPtr("node", node) else null;
const queue_tail = if (queue_head) |head| head.tail else null;
// Once we're done updating the head, fix it's tail pointer and update the treap's queue head as well.
@@ -699,7 +699,7 @@ const PosixImpl = struct {
};
// The queue head and tail must exist if we're removing a queued waiter.
- const head = @fieldParentPtr(Waiter, "node", entry.node orelse unreachable);
+ const head: *Waiter = @fieldParentPtr("node", entry.node orelse unreachable);
const tail = head.tail orelse unreachable;
// A waiter with a previous link is never the head of the queue.