W3cubDocs

/Kotlin

AtomicNativePtr

Platform and version requirements: Native (1.3)
class AtomicNativePtr

Constructors

Platform and version requirements: Native (1.3)

<init>

AtomicNativePtr(value_: NativePtr)

Properties

Platform and version requirements: Native (1.3)

value

The value being held by this class.

var value: NativePtr

Functions

Platform and version requirements: Native (1.3)

compareAndSet

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

fun compareAndSet(
    expected: NativePtr, 
    new: NativePtr
): Boolean
Platform and version requirements: Native (1.3)

compareAndSwap

Compares value with expected and replaces it with new value if values matches. If new value is not null, it must be frozen or permanent object.

fun compareAndSwap(
    expected: NativePtr, 
    new: NativePtr
): NativePtr
Platform and version requirements: Native (1.3)

toString

Returns the string representation of this object.

fun toString(): String

© 2010–2020 JetBrains s.r.o. and Kotlin Programming Language contributors
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.native.concurrent/-atomic-native-ptr/index.html