YieldProcessor Macro

Signals to the processor to give resources to threads that are waiting for them. This macro is only effective on processors that support technology allowing multiple threads running on a single processor, such as Intel's Hyperthreading technology.

Syntax

C++
void YieldProcessor(void);

Parameters

This macro has no parameters.

Return Value

This macro does not return a value.

Remarks

This macro can be called on all processor platforms where Windows is supported, but it has no effect on some platforms. The definition varies from platform to platform. The following are some definitions of this macro in Winnt.h:

#define YieldProcessor() __asm { rep nop }

#define YieldProcessor _mm_pause

#define YieldProcessor __yield

Requirements

Minimum supported clientWindows Vista
Minimum supported serverWindows Server 2003
HeaderWinnt.h (include Windows.h)

Send comments about this topic to Microsoft

Build date: 11/19/2009

Tags :


Page view tracker