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 library itself.

smallest_atomic_fetch_exch_size

atomics.smallest_atomic_fetch_exch_size
const smallest_atomic_fetch_exch_size = switch (arch)

File

lib/compiler_rt/atomics.zig:44

Code

const smallest_atomic_fetch_exch_size = switch (arch) {
    // On AMDGCN, there are no instructions for atomic operations other than load and store
    // (as of LLVM 15), and so these need to be implemented in terms of atomic CAS.
    .amdgcn => @sizeOf(u32),
    else => @sizeOf(u8),
}