CreateUmsCompletionList function (winbase.h)

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

Warning

As of Windows 11, user-mode scheduling is not supported. All calls fail with the error ERROR_NOT_SUPPORTED.

Syntax

BOOL CreateUmsCompletionList(
  [out] PUMS_COMPLETION_LIST *UmsCompletionList
);

Parameters

[out] UmsCompletionList

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 code Description
ERROR_NOT_ENOUGH_MEMORY
Not enough memory is available to create the completion list.
ERROR_NOT_SUPPORTED
UMS is not supported.

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

Requirement Value
Minimum supported client Windows 7 (64-bit only) [desktop apps only]
Minimum supported server Windows Server 2008 R2 [desktop apps only]
Target Platform Windows
Header winbase.h (include Windows.h)
Library Kernel32.lib
DLL Kernel32.dll
API set api-ms-win-core-ums-l1-1-0 (introduced in Windows 7)

See also

DequeueUmsCompletionListItems

EnterUmsSchedulingMode

GetUmsCompletionListEvent