NtAlertThreadByThreadId - 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
/**
 * Sends an alert to the specified thread.
 *
 * @param ThreadId The thread ID of the thread to be alerted.
 * @return NTSTATUS Successful or errant status.
 */
NTSYSCALLAPI
NTSTATUS
NTAPI
NtAlertThreadByThreadId(
    _In_ HANDLE ThreadId
    );

#endif
#endif
#endif

View code on GitHub
#ifndef _NTZWAPI_H

NTSYSCALLAPI
NTSTATUS
NTAPI
ZwAlertThreadByThreadId(
    _In_ HANDLE ThreadId
    );

#endif

View code on GitHub

Wakes another thread that previously called NtWaitForAlertByThreadId.

Parameters

Remarks

Despite the name, NtAlertThread and alertable waits via NtDelayExecution are unrelated to this functionality.

Related Win32 API

Required OS version

This function was introduced in Windows 8.

See also