Documentation ¶
Overview ¶
Package atomicext provides extensions complementing the built-in atomic package
Index ¶
- func AddFloat64(ptr *float64, value float64)
- func AndInt64(ptr *int64, value int64)
- func MaxFloat64(ptr *float64, value float64)
- func MaxInt64(ptr *int64, value int64)
- func MinFloat64(ptr *float64, value float64)
- func MinInt64(ptr *int64, value int64)
- func OrInt64(ptr *int64, value int64)
- func Pause()
- func XorInt64(ptr *int64, value int64)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddFloat64 ¶
func MaxFloat64 ¶
func MinFloat64 ¶
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]
Types ¶
This section is empty.