Address waits v0.1.0

Source
WaitOnAddress and the calls that wake its waiters.

WaitOnAddress

pub extern func WaitOnAddress(
    address: *opaque,
    compareAddress: *opaque,
    addressSize: uint64,
    milliseconds: uint32
) -> bool32

Waits for the value at an address to change.

See also: https://learn.microsoft.com/en-us/windows/win32/api/synchapi/nf-synchapi-waitonaddress

Source

Parameters

NameTypeDescription
address*opaquethe value to wait on
compareAddress*opaquea copy of the value the caller last saw; the wait ends at once when they differ
addressSizeuint64the value's size in bytes: 1, 2, 4 or 8
millisecondsuint32how long to wait at most, or INFINITE

Returns: non-zero after a wake, and zero on time-out or failure with the reason in GetLastError

WakeByAddressSingle

pub extern func WakeByAddressSingle(address: *opaque)

Wakes one thread waiting on an address.

See also: https://learn.microsoft.com/en-us/windows/win32/api/synchapi/nf-synchapi-wakebyaddresssingle

Source

Parameters

NameTypeDescription
address*opaquethe value it waits on

WakeByAddressAll

pub extern func WakeByAddressAll(address: *opaque)

Wakes every thread waiting on an address.

See also: https://learn.microsoft.com/en-us/windows/win32/api/synchapi/nf-synchapi-wakebyaddressall

Source

Parameters

NameTypeDescription
address*opaquethe value they wait on