NtSignalAndWaitForSingleObject - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
#ifndef _NTOBAPI_H
//
// Objects, handles
//
#if (PHNT_MODE != PHNT_MODE_KERNEL)

/**
 * The NtSignalAndWaitForSingleObject routine signals one object and waits on another object as a single operation.
 *
 * @param SignalHandle A handle to the object to be signaled.
 * @param WaitHandle A handle to the object to wait on. The SYNCHRONIZE access right is required.
 * @param Alertable If this parameter is TRUE, the function returns when the system queues an I/O completion routine or APC function, and the thread calls the function.
 * @param Timeout The time-out interval. The function returns if the interval elapses, even if the object's state is nonsignaled and no completion or APC objects are queued.
 * If zero, the function tests the object's state, checks for queued completion routines or APCs, and returns immediately. 
 * @return NTSTATUS Successful or errant status.
 * @sa https://learn.microsoft.com/en-us/windows/win32/api/synchapi/nf-synchapi-signalobjectandwait
 */
NTSYSCALLAPI
NTSTATUS
NTAPI
NtSignalAndWaitForSingleObject(
    _In_ HANDLE SignalHandle,
    _In_ HANDLE WaitHandle,
    _In_ BOOLEAN Alertable,
    _In_opt_ PLARGE_INTEGER Timeout
    );

#endif
#endif

View code on GitHub
#ifndef _NTZWAPI_H

NTSYSCALLAPI
NTSTATUS
NTAPI
ZwSignalAndWaitForSingleObject(
    _In_ HANDLE SignalHandle,
    _In_ HANDLE WaitHandle,
    _In_ BOOLEAN Alertable,
    _In_opt_ PLARGE_INTEGER Timeout
    );

#endif

View code on GitHub

Function NtSignalAndWaitForSingleObject signals one object and wait for second object. See also Win32 API SignalObjectAndWait description in Microsoft SDK.

ObjectToSignal

HANDLE to object to signal. Possible object's types are:

WaitableObject

HANDLE to object to wait for. Can be any waitable object.

Alertable

If set, APC Routine can break waiting.

Time

Optionally pointer to LARGE_INTEGER value specifying time (absolute or relative) when function time outs (in 100-ns units). Negative value means relative time.

Documented by

See also