cas

Stores 'writeThis' to the memory referenced by 'here' if the value referenced by 'here' is equal to 'ifThis'. This operation is both lock-free and atomic.

Parameters

here
Type: T*

The address of the destination variable.

writeThis
Type: V2

The value to store.

ifThis
Type: V1

The comparison value.

Return Value

Type: bool

true if the store occurred, false if not.

Suggestion Box / Bug Report