Expand Minimize

CreateUmsCompletionList function

Creates a user-mode scheduling (UMS) completion list.

Syntax


BOOL WINAPI CreateUmsCompletionList(
  _Out_  PUMS_COMPLETION_LIST *UmsCompletionList
);

Parameters

UmsCompletionList [out]

A PUMS_COMPLETION_LIST variable. On output, this parameter receives a pointer to an empty UMS completion list.

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. Possible error values include the following.

Return codeDescription
ERROR_NOT_ENOUGH_MEMORY

Not enough memory is available to create the completion list.

 

Remarks

A completion list is associated with a UMS scheduler thread when the EnterUmsSchedulingMode function is called to create the scheduler thread. The system queues newly created UMS worker threads to the completion list. It also queues previously blocked UMS worker threads to the completion list when the threads are no longer blocked.

When an application's UmsSchedulerProc entry point function is called, the application's scheduler should retrieve items from the completion list by calling DequeueUmsCompletionListItems.

Each completion list has an associated completion list event which is signaled whenever the system queues items to an empty list. Use the GetUmsCompletionListEvent to obtain a handle to the event for a specified completion list.

When a completion list is no longer needed, use the DeleteUmsCompletionList to release the list. The list must be empty before it can be released.

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

DequeueUmsCompletionListItems
EnterUmsSchedulingMode
GetUmsCompletionListEvent

 

 

Community Additions

ADD
Show:
© 2014 Microsoft