Export (0) Print
Expand All

Context::VirtualProcessorId Method

Returns an identifier for the virtual processor that the current context is executing on.

static unsigned int __cdecl VirtualProcessorId();

If the current context is attached to a scheduler, an identifier for the virtual processor that the current context is executing on; otherwise, the value -1.

The return value from this method is an instantaneous sampling of the virtual processor that the current context is executing on. This value can be stale the moment it is returned and cannot be relied upon. Typically, this method is used for debugging or tracing purposes only.

Header: concrt.h

Namespace: concurrency

Show:
© 2015 Microsoft