RtlWaitOnAddress - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
#ifndef _NTRTL_H
//
// Wait on address
//
// begin_rev
#if (PHNT_VERSION >= PHNT_WINDOWS_8)

/**
 * The RtlWaitOnAddress routine waits for the value at the specified address to change.
 *
 * \param Address The address on which to wait.
 * \param CompareAddress A pointer to the location of the previously observed value at Address.
 * \param AddressSize The size of the value, in bytes. This parameter can be 1, 2, 4, or 8.
 * \param Timeout The number of milliseconds to wait before the operation times out. If this parameter is NULL (INFINITE), the thread waits indefinitely.
 * \remarks WaitOnAddress is guaranteed to return when the address is signaled, but it is also allowed to return for other reasons.
 * For this reason, the caller should compare the new value with the original undesired value to confirm that the value has actually changed. 
 * \sa https://learn.microsoft.com/en-us/windows/win32/api/synchapi/nf-synchapi-waitonaddress
 */
NTSYSAPI
NTSTATUS
NTAPI
RtlWaitOnAddress(
    _In_reads_bytes_(AddressSize) volatile VOID *Address,
    _In_reads_bytes_(AddressSize) PVOID CompareAddress,
    _In_ SIZE_T AddressSize,
    _In_opt_ PLARGE_INTEGER Timeout
    );

#endif
// end_rev
#endif

View code on GitHub

NtDoc

No description available.