Expand Minimize

DeleteUmsThreadContext function

Deletes the specified user-mode scheduling (UMS) thread context. The thread must be terminated.

Syntax


BOOL WINAPI DeleteUmsThreadContext(
  _In_  PUMS_CONTEXT UmsThread
);

Parameters

UmsThread [in]

A pointer to the UMS thread context to be deleted. The CreateUmsThreadContext function provides this pointer.

Return value

If the function succeeds, it returns a nonzero value.

If the function fails, the return value is zero. To get extended error information, call GetLastError.

Remarks

A UMS thread context cannot be deleted until the associated thread has terminated.

When a UMS worker thread finishes running (for example, by returning from its thread entry point function), the system terminates the thread, sets the termination status in the thread's UMS thread context, and queues the UMS thread context to the associated completion list. Any attempt to execute the UMS thread will fail because the thread is already terminated.

To check the termination status of a thread, the application's scheduler should call QueryUmsThreadInformation with the UmsIsThreadTerminated information class.

Requirements

Minimum supported client

Windows 7 (64-bit only) [desktop apps only]

Minimum supported server

Windows Server 2008 R2 [desktop apps only]

Header

WinBase.h (include Windows.h)

Library

Kernel32.lib

DLL

Kernel32.dll

See also

CreateUmsThreadContext
QueryUmsThreadInformation

 

 

Community Additions

ADD
Show:
© 2014 Microsoft