| ... | @@ -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#} |