authorgravatar for isaac.yonemoto@gmail.comisaac yonemoto <isaac.yonemoto@gmail.com> 2024-10-20 11:09:04-05:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-01-26 23:22:04+01:00
logae5b1a9ca2d0d2fb80e8ed3d9a8eb7cdd32aa219
treece878f2a1201e495e9ab97e49b14a67a2498c6a0
parent658a4a527c2f2036573a3d6e88024a5c0af9802e

langref: fixes incorrect description of cmpxchg functions


1 files changed, 2 insertions(+), 2 deletions(-)

doc/langref.html.in+2-2
...@@ -4536,7 +4536,7 @@ comptime {...@@ -4536,7 +4536,7 @@ comptime {
4536 <pre>{#syntax#}@cmpxchgStrong(comptime T: type, ptr: *T, expected_value: T, new_value: T, success_order: AtomicOrder, fail_order: AtomicOrder) ?T{#endsyntax#}</pre>4536 <pre>{#syntax#}@cmpxchgStrong(comptime T: type, ptr: *T, expected_value: T, new_value: T, success_order: AtomicOrder, fail_order: AtomicOrder) ?T{#endsyntax#}</pre>
4537 <p>4537 <p>
4538 This function performs a strong atomic compare-and-exchange operation, returning {#syntax#}null{#endsyntax#}4538 This function performs a strong atomic compare-and-exchange operation, returning {#syntax#}null{#endsyntax#}
4539 if the current value is not the given expected value. It's the equivalent of this code,4539 if the current value is the given expected value. It's the equivalent of this code,
4540 except atomic:4540 except atomic:
4541 </p>4541 </p>
4542 {#code|not_atomic_cmpxchgStrong.zig#}4542 {#code|not_atomic_cmpxchgStrong.zig#}
...@@ -4558,7 +4558,7 @@ comptime {...@@ -4558,7 +4558,7 @@ comptime {
4558 <pre>{#syntax#}@cmpxchgWeak(comptime T: type, ptr: *T, expected_value: T, new_value: T, success_order: AtomicOrder, fail_order: AtomicOrder) ?T{#endsyntax#}</pre>4558 <pre>{#syntax#}@cmpxchgWeak(comptime T: type, ptr: *T, expected_value: T, new_value: T, success_order: AtomicOrder, fail_order: AtomicOrder) ?T{#endsyntax#}</pre>
4559 <p>4559 <p>
4560 This function performs a weak atomic compare-and-exchange operation, returning {#syntax#}null{#endsyntax#}4560 This function performs a weak atomic compare-and-exchange operation, returning {#syntax#}null{#endsyntax#}
4561 if the current value is not the given expected value. It's the equivalent of this code,4561 if the current value is the given expected value. It's the equivalent of this code,
4562 except atomic:4562 except atomic:
4563 </p>4563 </p>
4564 {#syntax_block|zig|cmpxchgWeakButNotAtomic#}4564 {#syntax_block|zig|cmpxchgWeakButNotAtomic#}