NtWaitForAlertByThreadId - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
#ifndef _NTPSAPI_H
// Threads
#if (PHNT_MODE != PHNT_MODE_KERNEL)
#if (PHNT_VERSION >= PHNT_WIN8)

// rev
NTSYSCALLAPI
NTSTATUS
NTAPI
NtWaitForAlertByThreadId(
    _In_ PVOID Address,
    _In_opt_ PLARGE_INTEGER Timeout
    );

#endif
#endif
#endif

View code on GitHub
#ifndef _NTZWAPI_H

NTSYSCALLAPI
NTSTATUS
NTAPI
ZwWaitForAlertByThreadId(
    _In_ PVOID Address,
    _In_opt_ PLARGE_INTEGER Timeout
    );

#endif

View code on GitHub

Waits on the specified address to be alerted-by-ID by another thread.

Parameters

Notable return values

Remarks

Despite the name, the wait this function enters is not alertable and, thus, cannot be interrupted by APCs or NtAlertThread. Alertable waits via NtDelayExecution are unrelated to this functionality.

Related Win32 API

Required OS version

This function was introduced in Windows 8.

See also