atomickit

package
v0.0.0-...-05bc493 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bool

type Bool struct {
	// contains filtered or unexported fields
}

func NewBool

func NewBool(initValue bool) Bool

func (*Bool) CompareAndFlip

func (p *Bool) CompareAndFlip(old bool) bool

func (*Bool) Flip

func (p *Bool) Flip() bool

func (*Bool) Load

func (p *Bool) Load() bool

func (*Bool) Set

func (p *Bool) Set()

func (*Bool) Store

func (p *Bool) Store(v bool)

func (*Bool) String

func (p *Bool) String() string

func (*Bool) Swap

func (p *Bool) Swap(v bool) bool

func (*Bool) Unset

func (p *Bool) Unset()

type Int

type Int struct {
	// contains filtered or unexported fields
}

func NewInt

func NewInt(v int) Int

func (*Int) Add

func (p *Int) Add(v int) int

func (*Int) CompareAndSwap

func (p *Int) CompareAndSwap(old, new int) bool

func (*Int) Load

func (p *Int) Load() int

func (*Int) SetGreater

func (p *Int) SetGreater(v int) int

func (*Int) SetLesser

func (p *Int) SetLesser(v int) int

func (*Int) Store

func (p *Int) Store(v int)

func (*Int) String

func (p *Int) String() string

func (*Int) Sub

func (p *Int) Sub(v int) int

func (*Int) Swap

func (p *Int) Swap(v int) int

type Int32

type Int32 struct {
	// contains filtered or unexported fields
}

func NewInt32

func NewInt32(v int32) Int32

func (*Int32) Add

func (p *Int32) Add(v int32) int32

func (*Int32) CompareAndSwap

func (p *Int32) CompareAndSwap(old, new int32) bool

func (*Int32) Load

func (p *Int32) Load() int32

func (*Int32) SetGreater

func (p *Int32) SetGreater(v int32) int32

func (*Int32) SetLesser

func (p *Int32) SetLesser(v int32) int32

func (*Int32) Store

func (p *Int32) Store(v int32)

func (*Int32) String

func (p *Int32) String() string

func (*Int32) Sub

func (p *Int32) Sub(v int32) int32

func (*Int32) Swap

func (p *Int32) Swap(v int32) int32

type Int64

type Int64 struct {
	// contains filtered or unexported fields
}

func NewInt64

func NewInt64(v int64) Int64

func (*Int64) Add

func (p *Int64) Add(v int64) int64

func (*Int64) CompareAndSwap

func (p *Int64) CompareAndSwap(old, new int64) bool

func (*Int64) Load

func (p *Int64) Load() int64

func (*Int64) SetGreater

func (p *Int64) SetGreater(v int64) int64

func (*Int64) SetLesser

func (p *Int64) SetLesser(v int64) int64

func (*Int64) Store

func (p *Int64) Store(v int64)

func (*Int64) String

func (p *Int64) String() string

func (*Int64) Sub

func (p *Int64) Sub(v int64) int64

func (*Int64) Swap

func (p *Int64) Swap(v int64) int64

type Once

type Once struct {
	// contains filtered or unexported fields
}

func (*Once) Do

func (p *Once) Do(f func())

func (*Once) DoWithValue

func (p *Once) DoWithValue(f func() uint32)

func (*Once) GetDone

func (p *Once) GetDone() uint32

func (*Once) IsDone

func (p *Once) IsDone() bool

type OnceByteString

type OnceByteString struct {
	// contains filtered or unexported fields
}

func NewOnceByteString

func NewOnceByteString(v longbits.ByteString) OnceByteString

func (*OnceByteString) CompareAndStore

func (p *OnceByteString) CompareAndStore(new longbits.ByteString) bool

func (*OnceByteString) Load

func (*OnceByteString) MustStore

func (p *OnceByteString) MustStore(v longbits.ByteString)

func (*OnceByteString) StoreOnce

func (p *OnceByteString) StoreOnce(v longbits.ByteString) bool

func (*OnceByteString) String

func (p *OnceByteString) String() string

func (*OnceByteString) TryLoad

func (p *OnceByteString) TryLoad() (longbits.ByteString, bool)

type OnceFlag

type OnceFlag struct {
	// contains filtered or unexported fields
}

func (*OnceFlag) DoSet

func (p *OnceFlag) DoSet(f func()) bool

func (*OnceFlag) DoSpin

func (p *OnceFlag) DoSpin(f func()) bool

func (*OnceFlag) IsSet

func (p *OnceFlag) IsSet() bool

func (*OnceFlag) Set

func (p *OnceFlag) Set() bool

type StartStopFlag

type StartStopFlag struct {
	// contains filtered or unexported fields
}

func (*StartStopFlag) DoDiscard

func (p *StartStopFlag) DoDiscard(discardFn, stopFn func()) bool

func (*StartStopFlag) DoDiscardByOne

func (p *StartStopFlag) DoDiscardByOne(fn func(wasStarted bool)) bool

func (*StartStopFlag) DoStart

func (p *StartStopFlag) DoStart(f func()) bool

func (*StartStopFlag) DoStop

func (p *StartStopFlag) DoStop(f func()) bool

func (*StartStopFlag) IsActive

func (p *StartStopFlag) IsActive() bool

func (*StartStopFlag) IsStarting

func (p *StartStopFlag) IsStarting() bool

func (*StartStopFlag) IsStopped

func (p *StartStopFlag) IsStopped() bool

func (*StartStopFlag) IsStopping

func (p *StartStopFlag) IsStopping() bool

func (*StartStopFlag) Start

func (p *StartStopFlag) Start() bool

func (*StartStopFlag) Status

func (p *StartStopFlag) Status() (isActive, wasStarted bool)

func (*StartStopFlag) Stop

func (p *StartStopFlag) Stop() bool

func (*StartStopFlag) WasStarted

func (p *StartStopFlag) WasStarted() bool

func (*StartStopFlag) WasStopped

func (p *StartStopFlag) WasStopped() bool

type Uint

type Uint struct {
	// contains filtered or unexported fields
}

func NewUint

func NewUint(v uint) Uint

func (*Uint) Add

func (p *Uint) Add(v uint) uint

func (*Uint) CompareAndSetBits

func (p *Uint) CompareAndSetBits(maskOut, deny, v uint) bool

func (*Uint) CompareAndSub

func (p *Uint) CompareAndSub(v uint) bool

func (*Uint) CompareAndSwap

func (p *Uint) CompareAndSwap(old, new uint) bool

func (*Uint) Load

func (p *Uint) Load() uint

func (*Uint) SetBits

func (p *Uint) SetBits(v uint) uint

func (*Uint) SetGreater

func (p *Uint) SetGreater(v uint) uint

func (*Uint) SetLesser

func (p *Uint) SetLesser(v uint) uint

func (*Uint) Store

func (p *Uint) Store(v uint)

func (*Uint) String

func (p *Uint) String() string

func (*Uint) Sub

func (p *Uint) Sub(v uint) uint

func (*Uint) Swap

func (p *Uint) Swap(v uint) uint

func (*Uint) TrySetBits

func (p *Uint) TrySetBits(v uint, all bool) bool

func (*Uint) TryUnsetBits

func (p *Uint) TryUnsetBits(v uint, all bool) bool

func (*Uint) UnsetBits

func (p *Uint) UnsetBits(v uint) uint

type Uint32

type Uint32 struct {
	// contains filtered or unexported fields
}

func NewUint32

func NewUint32(v uint32) Uint32

func (*Uint32) Add

func (p *Uint32) Add(v uint32) uint32

func (*Uint32) CompareAndSetBits

func (p *Uint32) CompareAndSetBits(maskOut, deny, v uint32) bool

func (*Uint32) CompareAndSub

func (p *Uint32) CompareAndSub(v uint32) bool

func (*Uint32) CompareAndSwap

func (p *Uint32) CompareAndSwap(old, new uint32) bool

func (*Uint32) Load

func (p *Uint32) Load() uint32

func (*Uint32) SetBits

func (p *Uint32) SetBits(v uint32) uint32

func (*Uint32) SetGreater

func (p *Uint32) SetGreater(v uint32) uint32

func (*Uint32) SetLesser

func (p *Uint32) SetLesser(v uint32) uint32

func (*Uint32) Store

func (p *Uint32) Store(v uint32)

func (*Uint32) String

func (p *Uint32) String() string

func (*Uint32) Sub

func (p *Uint32) Sub(v uint32) uint32

func (*Uint32) Swap

func (p *Uint32) Swap(v uint32) uint32

func (*Uint32) TrySetBits

func (p *Uint32) TrySetBits(v uint32, all bool) bool

func (*Uint32) TryUnsetBits

func (p *Uint32) TryUnsetBits(v uint32, all bool) bool

func (*Uint32) UnsetBits

func (p *Uint32) UnsetBits(v uint32) uint32

type Uint64

type Uint64 struct {
	// contains filtered or unexported fields
}

func NewUint64

func NewUint64(v uint64) Uint64

func (*Uint64) Add

func (p *Uint64) Add(v uint64) uint64

func (*Uint64) CompareAndSetBits

func (p *Uint64) CompareAndSetBits(maskOut, deny, v uint64) bool

func (*Uint64) CompareAndSub

func (p *Uint64) CompareAndSub(v uint64) bool

func (*Uint64) CompareAndSwap

func (p *Uint64) CompareAndSwap(old, new uint64) bool

func (*Uint64) Load

func (p *Uint64) Load() uint64

func (*Uint64) SetBits

func (p *Uint64) SetBits(v uint64) uint64

func (*Uint64) SetGreater

func (p *Uint64) SetGreater(v uint64) uint64

func (*Uint64) SetLesser

func (p *Uint64) SetLesser(v uint64) uint64

func (*Uint64) Store

func (p *Uint64) Store(v uint64)

func (*Uint64) String

func (p *Uint64) String() string

func (*Uint64) Sub

func (p *Uint64) Sub(v uint64) uint64

func (*Uint64) Swap

func (p *Uint64) Swap(v uint64) uint64

func (*Uint64) TrySetBits

func (p *Uint64) TrySetBits(v uint64, all bool) bool

func (*Uint64) TryUnsetBits

func (p *Uint64) TryUnsetBits(v uint64, all bool) bool

func (*Uint64) UnsetBits

func (p *Uint64) UnsetBits(v uint64) uint64

Jump to

Keyboard shortcuts

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