Zig 0.17.0-dev (Split by item) This is an example of documentation generated by
ZigDoc , an alternative to Zig's built-in
Auto Doc feature. See also
examples in other modes/formats . The project being documented here (as the example) is the Zig standard library.
std › zig › llvm › Builder › WipFunction › atomicrmw Public Function atomicrmw Doc Source 6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988 pub fn atomicrmw (
self : *WipFunction ,
access_kind : MemoryAccessKind ,
operation : Instruction .AtomicRmw .Operation ,
ptr : Value ,
val : Value ,
sync_scope : SyncScope ,
ordering : AtomicOrdering ,
alignment : Alignment ,
name : []const u8 ,
) Allocator .Error !Value {
assert (ptr .typeOfWip (self ).isPointer (self .builder ));
assert (ordering != .none );
try self .ensureUnusedExtraCapacity (1 , Instruction .AtomicRmw , 0 );
const instruction = try self .addInst (name , .{
.tag = .atomicrmw ,
.data = self .addExtraAssumeCapacity (Instruction .AtomicRmw {
.info = .{
.access_kind = access_kind ,
.atomic_rmw_operation = operation ,
.sync_scope = sync_scope ,
.success_ordering = ordering ,
.alignment = alignment ,
},
.ptr = ptr ,
.val = val ,
}),
});
return instruction .toValue ();
}