gvisorgvisor.dev/gvisor/pkg/sync/seqatomic Index | Files

package seqatomic

import "gvisor.dev/gvisor/pkg/sync/seqatomic"

Package seqatomic doesn't exist. This file must be instantiated using the go_template_instance rule in tools/go_generics/defs.bzl.

Index

Functions

func SeqAtomicStore

func SeqAtomicStore(seq *sync.SeqCount, ptr *Value, val Value)

SeqAtomicStore sets *ptr to a copy of val, ensuring that any racing reader critical sections are forced to retry.

func SeqAtomicStoreSeqed

func SeqAtomicStoreSeqed(ptr *Value, val Value)

SeqAtomicStoreSeqed sets *ptr to a copy of val.

Preconditions: ptr is protected by a SeqCount that will be in a writer critical section throughout the call to SeqAtomicStore.

Types

type Value

type Value struct{}

Value is a required type parameter.

func SeqAtomicLoad

func SeqAtomicLoad(seq *sync.SeqCount, ptr *Value) Value

SeqAtomicLoad returns a copy of *ptr, ensuring that the read does not race with any writer critical sections in seq.

func SeqAtomicTryLoad

func SeqAtomicTryLoad(seq *sync.SeqCount, epoch sync.SeqCountEpoch, ptr *Value) (val Value, ok bool)

SeqAtomicTryLoad returns a copy of *ptr while in a reader critical section in seq initiated by a call to seq.BeginRead() that returned epoch. If the read would race with a writer critical section, SeqAtomicTryLoad returns (unspecified, false).

Source Files

generic_seqatomic_unsafe.go

Version
v0.0.0-20250508033829-06acafc42203 (latest)
Published
May 8, 2025
Platform
linux/amd64
Imports
3 packages
Last checked
10 hours ago

Tools for package owners.