Expand Minimize

UmsThreadYield function

Yields control to the user-mode scheduling (UMS) scheduler thread on which the calling UMS worker thread is running.

Syntax


BOOL WINAPI UmsThreadYield(
  _In_  PVOID SchedulerParam
);

Parameters

SchedulerParam [in]

A parameter to pass to the scheduler thread's UmsSchedulerProc function.

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 worker thread calls the UmsThreadYield function to cooperatively yield control to the UMS scheduler thread on which the worker thread is running. If a UMS worker thread never calls UmsThreadYield, the worker thread runs until it either blocks or is terminated.

When control switches to the UMS scheduler thread, the system calls the associated scheduler entry point function with the reason UmsSchedulerThreadYield and the ScheduleParam parameter specified by the worker thread in the UmsThreadYield call.

The application's scheduler is responsible for rescheduling the worker thread.

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

UmsSchedulerProc

 

 

Community Additions

ADD
Show:
© 2014 Microsoft