std.atomic.cache_line
The estimated size of the CPU's cache line when atomically updating memory.
- Kind
- constant
- Module
std.atomic
Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
The entries of std.atomic in the Zig reference. This page has 25 cards.
The estimated size of the CPU's cache line when atomically updating memory.
std.atomicSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn cacheLineForCpu(cpu: std.Target.Cpu) u16
std.atomicSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
A lock-free single-owner resource.
std.atomicSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn tryLock(m: *Mutex) bool
std.atomicSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn unlock(m: *Mutex) void
std.atomicSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn spinLoopHint() void
Signals to the processor that the caller is inside a busy-wait spin-loop.
std.atomicSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn Value(comptime T: type) type
This is a thin wrapper around a primitive value to prevent accidental data races.
std.atomicSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn bitReset(self: *Self, bit: Bit, comptime order: AtomicOrder) u1
Marked `inline` so that if `bit` is comptime-known, the instruction can be lowered to a more efficient machine code instruction if possible.
std.atomicSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn bitSet(self: *Self, bit: Bit, comptime order: AtomicOrder) u1
Marked `inline` so that if `bit` is comptime-known, the instruction can be lowered to a more efficient machine code instruction if possible.
std.atomicSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn bitToggle(self: *Self, bit: Bit, comptime order: AtomicOrder) u1
Marked `inline` so that if `bit` is comptime-known, the instruction can be lowered to a more efficient machine code instruction if possible.
std.atomicSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn cmpxchgStrong(self: *Self, expected_value: T, new_value: T, comptime success_order: AtomicOrder, comptime fail_order: AtomicOrder) ?T
std.atomicSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn cmpxchgWeak(self: *Self, expected_value: T, new_value: T, comptime success_order: AtomicOrder, comptime fail_order: AtomicOrder) ?T
std.atomicSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn fetchAdd(self: *Self, operand: T, comptime order: AtomicOrder) T
std.atomicSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn fetchAnd(self: *Self, operand: T, comptime order: AtomicOrder) T
std.atomicSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn fetchMax(self: *Self, operand: T, comptime order: AtomicOrder) T
std.atomicSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn fetchMin(self: *Self, operand: T, comptime order: AtomicOrder) T
std.atomicSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn fetchNand(self: *Self, operand: T, comptime order: AtomicOrder) T
std.atomicSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn fetchOr(self: *Self, operand: T, comptime order: AtomicOrder) T
std.atomicSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn fetchSub(self: *Self, operand: T, comptime order: AtomicOrder) T
std.atomicSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn fetchXor(self: *Self, operand: T, comptime order: AtomicOrder) T
std.atomicSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn init(value: T) Self
std.atomicSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn load(self: *const Self, comptime order: AtomicOrder) T
std.atomicSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn rmw(self: *Self, comptime op: std.builtin.AtomicRmwOp, operand: T, comptime order: AtomicOrder) T
std.atomicSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn store(self: *Self, value: T, comptime order: AtomicOrder) void
std.atomicSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn swap(self: *Self, operand: T, comptime order: AtomicOrder) T
std.atomicSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.