AtomicNativePtr

Native
1.3
class AtomicNativePtr
(source)

Wrapper around kotlinx.cinterop.NativePtr with atomic synchronized operations.

Legacy MM: Atomic values and freezing: this type is unique with regard to freezing. Namely, it provides mutating operations, while can participate in frozen subgraphs. So shared frozen objects can have mutable fields of AtomicNativePtr type.

Constructors

Native
1.3

<init>

Wrapper around kotlinx.cinterop.NativePtr with atomic synchronized operations.

AtomicNativePtr(value_: NativePtr)

Properties

Native
1.3

value

The value being held by this class.

var value: NativePtr

Functions

Native
1.3

compareAndSet

Compares value with expected and replaces it with new value if values matches.

fun compareAndSet(
    expected: NativePtr,
    new: NativePtr
): Boolean
Native
1.3

compareAndSwap

Compares value with expected and replaces it with new value if values matches.

fun compareAndSwap(
    expected: NativePtr,
    new: NativePtr
): NativePtr
Native
1.3

toString

Returns the string representation of this object.

fun toString(): String