cas

package
v0.0.0-...-9835270 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2021 License: AGPL-3.0, Apache-2.0, MIT Imports: 2 Imported by: 0

Documentation

Overview

compare and swap util

Index

Constants

View Source
const DefLoopTime = time.Millisecond * 5

Variables

View Source
var (
	AddInt32              = atomic.AddInt32
	AddInt64              = atomic.AddInt64
	AddUint32             = atomic.AddUint32
	AddUint64             = atomic.AddUint64
	AddUintptr            = atomic.AddUintptr
	CompareAndSwapInt32   = atomic.CompareAndSwapInt32
	CompareAndSwapInt64   = atomic.CompareAndSwapInt64
	CompareAndSwapPointer = atomic.CompareAndSwapPointer
	CompareAndSwapUint32  = atomic.CompareAndSwapUint32
	CompareAndSwapUint64  = atomic.CompareAndSwapUint64
	CompareAndSwapUintptr = atomic.CompareAndSwapUintptr
	LoadInt32             = atomic.LoadInt32
	LoadInt64             = atomic.LoadInt64
	LoadPointer           = atomic.LoadPointer
	LoadUint32            = atomic.LoadUint32
	LoadUint64            = atomic.LoadUint64
	LoadUintptr           = atomic.LoadUintptr
	StoreInt32            = atomic.StoreInt32
	StoreInt64            = atomic.StoreInt64
	StorePointer          = atomic.StorePointer
	StoreUint32           = atomic.StoreUint32
	StoreUint64           = atomic.StoreUint64
	StoreUintptr          = atomic.StoreUintptr
	SwapInt32             = atomic.SwapInt32
	SwapInt64             = atomic.SwapInt64
	SwapPointer           = atomic.SwapPointer
	SwapUint32            = atomic.SwapUint32
	SwapUint64            = atomic.SwapUint64
	SwapUintptr           = atomic.SwapUintptr
)

Functions

func LargeAndSetInt32

func LargeAndSetInt32(v int32, p *int32)

func LargeAndSetInt64

func LargeAndSetInt64(v int64, p *int64)

func SmallAndSetInt32

func SmallAndSetInt32(v int32, p *int32)

func SmallAndSetInt64

func SmallAndSetInt64(v int64, p *int64)

Types

type Mutex

type Mutex struct {
	LoopTimeout time.Duration
	// contains filtered or unexported fields
}

func (*Mutex) Lock

func (m *Mutex) Lock()

func (*Mutex) Unlock

func (m *Mutex) Unlock()

Jump to

Keyboard shortcuts

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