Initiates a sleep on the current thread.
Alertable
- determines whether the sleep should be altertable. This allows external triggers (such as APCs or calls toNtAlertThread
) to interrupt sleep prematurely.DelayInterval
- a pointer to a variable that stores the wait internal. A negative value indicates relative timeout for the specified number of 100-nanosecond intervals. To sleep for a specific number of milliseconds, multiply them by-10,000
. Positive values indicate an absolute time.
STATUS_SUCCESS
- the thread woke due to the timeout.STATUS_USER_APC
- the sleep was interrupted by an APC.STATUS_ALERTED
- the sleep was interrupted by a call toNtAlertThread
.
Despite the name, NtAlertThreadByThreadId
is unrelated to alertable sleeps and cannot interrupt them.
NtWaitForSingleObject
NtWaitForMultipleObjects
NtAlertThread
NtQueueApcThread