fn tryPushNode(arena: *ArenaAllocator, node: *Node) PushResult
fn tryPushNode(arena: *ArenaAllocator, node: *Node) PushResult { assert(node != node.next); if (@cmpxchgStrong( // strong because retrying means discarding a fitting node -> expensive ?*Node, &arena.state.used_list, node.next, node, .release, // syncs with acquire in failure path or `loadFirstNode` .acquire, // syncs with release in success path )) |old_node| { return .{ .failure = old_node }; } else { return .success; } }