@@ -4218,11 +4218,10 @@ pub fn print(self: *Writer, arg0: []const u8, arg1: i32) !void {
4218
4218
{#header_close#}
4219
4219
4220
4220
{#header_open|Atomics#}
4221
- <p>TODO: @fence()</p>
4222
4221
<p>TODO: @atomic rmw</p>
4223
4222
<p>TODO: builtin atomic memory ordering enum</p>
4224
4223
4225
- {#see_also|@atomicLoad|@atomicStore|@atomicRmw|@fence|@ cmpxchgWeak|@cmpxchgStrong#}
4224
+ {#see_also|@atomicLoad|@atomicStore|@atomicRmw|@cmpxchgWeak|@cmpxchgStrong#}
4226
4225
4227
4226
{#header_close#}
4228
4227
@@ -4307,7 +4306,7 @@ comptime {
4307
4306
an integer or an enum.
4308
4307
</p>
4309
4308
<p>{#syntax#}AtomicOrder{#endsyntax#} can be found with {#syntax#}@import("std").builtin.AtomicOrder{#endsyntax#}.</p>
4310
- {#see_also|@atomicStore|@atomicRmw|@fence |@cmpxchgWeak|@cmpxchgStrong#}
4309
+ {#see_also|@atomicStore|@atomicRmw||@cmpxchgWeak|@cmpxchgStrong#}
4311
4310
{#header_close#}
4312
4311
4313
4312
{#header_open|@atomicRmw#}
@@ -4322,7 +4321,7 @@ comptime {
4322
4321
</p>
4323
4322
<p>{#syntax#}AtomicOrder{#endsyntax#} can be found with {#syntax#}@import("std").builtin.AtomicOrder{#endsyntax#}.</p>
4324
4323
<p>{#syntax#}AtomicRmwOp{#endsyntax#} can be found with {#syntax#}@import("std").builtin.AtomicRmwOp{#endsyntax#}.</p>
4325
- {#see_also|@atomicStore|@atomicLoad|@fence|@ cmpxchgWeak|@cmpxchgStrong#}
4324
+ {#see_also|@atomicStore|@atomicLoad|@cmpxchgWeak|@cmpxchgStrong#}
4326
4325
{#header_close#}
4327
4326
4328
4327
{#header_open|@atomicStore#}
@@ -4335,7 +4334,7 @@ comptime {
4335
4334
an integer or an enum.
4336
4335
</p>
4337
4336
<p>{#syntax#}AtomicOrder{#endsyntax#} can be found with {#syntax#}@import("std").builtin.AtomicOrder{#endsyntax#}.</p>
4338
- {#see_also|@atomicLoad|@atomicRmw|@fence|@ cmpxchgWeak|@cmpxchgStrong#}
4337
+ {#see_also|@atomicLoad|@atomicRmw|@cmpxchgWeak|@cmpxchgStrong#}
4339
4338
{#header_close#}
4340
4339
4341
4340
{#header_open|@bitCast#}
@@ -4568,7 +4567,7 @@ comptime {
4568
4567
</p>
4569
4568
<p>{#syntax#}@typeInfo(@TypeOf(ptr)).pointer.alignment{#endsyntax#} must be {#syntax#}>= @sizeOf(T).{#endsyntax#}</p>
4570
4569
<p>{#syntax#}AtomicOrder{#endsyntax#} can be found with {#syntax#}@import("std").builtin.AtomicOrder{#endsyntax#}.</p>
4571
- {#see_also|@atomicStore|@atomicLoad|@atomicRmw|@fence|@ cmpxchgWeak#}
4570
+ {#see_also|@atomicStore|@atomicLoad|@atomicRmw|@cmpxchgWeak#}
4572
4571
{#header_close#}
4573
4572
4574
4573
{#header_open|@cmpxchgWeak#}
@@ -4600,7 +4599,7 @@ fn cmpxchgWeakButNotAtomic(comptime T: type, ptr: *T, expected_value: T, new_val
4600
4599
</p>
4601
4600
<p>{#syntax#}@typeInfo(@TypeOf(ptr)).pointer.alignment{#endsyntax#} must be {#syntax#}>= @sizeOf(T).{#endsyntax#}</p>
4602
4601
<p>{#syntax#}AtomicOrder{#endsyntax#} can be found with {#syntax#}@import("std").builtin.AtomicOrder{#endsyntax#}.</p>
4603
- {#see_also|@atomicStore|@atomicLoad|@atomicRmw|@fence|@ cmpxchgStrong#}
4602
+ {#see_also|@atomicStore|@atomicLoad|@atomicRmw|@cmpxchgStrong#}
4604
4603
{#header_close#}
4605
4604
4606
4605
{#header_open|@compileError#}
@@ -4766,10 +4765,10 @@ fn cmpxchgWeakButNotAtomic(comptime T: type, ptr: *T, expected_value: T, new_val
4766
4765
Converts an integer into an {#link|enum#} value. The return type is the inferred result type.
4767
4766
</p>
4768
4767
<p>
4769
- Attempting to convert an integer with no corresponding value in the enum invokes
4768
+ Attempting to convert an integer with no corresponding value in the enum invokes
4770
4769
safety-checked {#link|Undefined Behavior#}.
4771
4770
Note that a {#link|non-exhaustive enum|Non-exhaustive enum#} has corresponding values for all
4772
- integers in the enum's integer tag type: the {#syntax#}_{#endsyntax#} value represents all
4771
+ integers in the enum's integer tag type: the {#syntax#}_{#endsyntax#} value represents all
4773
4772
the remaining unnamed integers in the enum's tag type.
4774
4773
</p>
4775
4774
{#see_also|@intFromEnum#}
@@ -4857,15 +4856,6 @@ fn cmpxchgWeakButNotAtomic(comptime T: type, ptr: *T, expected_value: T, new_val
4857
4856
{#see_also|@export#}
4858
4857
{#header_close#}
4859
4858
4860
- {#header_open|@fence#}
4861
- <pre>{#syntax#}@fence(order: AtomicOrder) void{#endsyntax#}</pre>
4862
- <p>
4863
- The {#syntax#}fence{#endsyntax#} function is used to introduce happens-before edges between operations.
4864
- </p>
4865
- <p>{#syntax#}AtomicOrder{#endsyntax#} can be found with {#syntax#}@import("std").builtin.AtomicOrder{#endsyntax#}.</p>
4866
- {#see_also|@atomicStore|@atomicLoad|@atomicRmw|@cmpxchgWeak|@cmpxchgStrong#}
4867
- {#header_close#}
4868
-
4869
4859
{#header_open|@field#}
4870
4860
<pre>{#syntax#}@field(lhs: anytype, comptime field_name: []const u8) (field){#endsyntax#}</pre>
4871
4861
<p>Performs field access by a compile-time string. Works on both fields and declarations.
@@ -6241,11 +6231,13 @@ fn cmpxchgWeakButNotAtomic(comptime T: type, ptr: *T, expected_value: T, new_val
6241
6231
</li>
6242
6232
<li>Are you linking libc? In this case, {#syntax#}std.heap.c_allocator{#endsyntax#} is likely
6243
6233
the right choice, at least for your main allocator.</li>
6234
+ <li>
6235
+ Need to use the same allocator in multiple threads? Use one of your choice
6236
+ wrapped around {#syntax#}std.heap.ThreadSafeAllocator{#endsyntax#}
6237
+ </li>
6244
6238
<li>
6245
6239
Is the maximum number of bytes that you will need bounded by a number known at
6246
- {#link|comptime#}? In this case, use {#syntax#}std.heap.FixedBufferAllocator{#endsyntax#} or
6247
- {#syntax#}std.heap.ThreadSafeFixedBufferAllocator{#endsyntax#} depending on whether you need
6248
- thread-safety or not.
6240
+ {#link|comptime#}? In this case, use {#syntax#}std.heap.FixedBufferAllocator{#endsyntax#}.
6249
6241
</li>
6250
6242
<li>
6251
6243
Is your program a command line application which runs from start to end without any fundamental
0 commit comments