Share via


GetCurrentProcessorNumber (Compact 2013)

3/28/2014

This function obtains the number of the processor on which the current thread is running during the call to this function.

Syntax

DWORD WINAPI GetCurrentProcessorNumber(void);

Parameters

None.

Return Value

The current processor number.

Remarks

The processor number is a 1-based index.

This function is used to provide information for estimating process performance and for testing. Unless the calling thread has processor affinity set, the value is just a snapshot.

The function is purely for testing and estimation of performance, and should not be use for any other purposes. A thread can be rescheduled to run on another processor right after the call.

Requirements

Header

kfuncs.h,
windbase.h

Library

coredll.lib

See Also

Reference

SMP Functions