Export (0) Print
Expand All

PsTerminateSystemThread routine

The PsTerminateSystemThread routine terminates the current system thread.

Syntax


NTSTATUS PsTerminateSystemThread(
  _In_ NTSTATUS ExitStatus
);

Parameters

ExitStatus [in]

Specifies the status of the terminating system thread.

Return value

PsTerminateSystemThread does not return if it successfully terminates the calling thread. If the routine cannot terminate the thread (for example, if the thread is not a system thread), the routine returns an error NTSTATUS value.

Remarks

A system thread calls PsTerminateSystemThread to terminate itself. A driver that creates its own threads must ensure that each such thread terminates. The driver must not terminate any threads that the system or other drivers created.

Requirements

Target platform

Universal

Version

Available starting with Windows 2000.

Header

Wdm.h (include Wdm.h, Ntddk.h, or Ntifs.h)

Library

Ntoskrnl.lib

IRQL

PASSIVE_LEVEL

DDI compliance rules

IrqlPsPassive, PowerIrpDDis, HwStorPortProhibitedDDIs

See also

PsCreateSystemThread

 

 

Send comments about this topic to Microsoft

Show:
© 2015 Microsoft