atomicext

package
v0.0.0-...-86e9f11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 7, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package atomicext provides extensions complementing the built-in atomic package

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddFloat64

func AddFloat64(ptr *float64, value float64)

func AndInt64

func AndInt64(ptr *int64, value int64)

func MaxFloat64

func MaxFloat64(ptr *float64, value float64)

func MaxInt64

func MaxInt64(ptr *int64, value int64)

func MinFloat64

func MinFloat64(ptr *float64, value float64)

func MinInt64

func MinInt64(ptr *int64, value int64)

func OrInt64

func OrInt64(ptr *int64, value int64)

func Pause

func Pause()

Pause improves the performance of spin-wait loops. When executing a "spin-wait loop," processors will suffer a severe performance penalty when exiting the loop because it detects a possible memory order violation. The Pause function provides a hint to the processor that the code sequence is a spin-wait loop. The processor uses this hint to avoid the memory order violation in most situations, which greatly improves processor performance. For this reason, it is recommended that a Pause instruction be placed in all spin-wait loops. [paraphrasing the Intel SDM, vol. 2B 4-235]

func XorInt64

func XorInt64(ptr *int64, value int64)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL