RtlGetCurrentProcessorNumber - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
#ifndef _NTRTL_H

// rev
/**
 * The RtlGetCurrentProcessorNumber routine retrieves the number of the processor the current thread was running 
 * on during the call to this function.
 *
 * \return The function returns the current processor number.
 * \sa https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-getcurrentprocessornumber
 */
NTSYSAPI
ULONG
NTAPI
RtlGetCurrentProcessorNumber(
    VOID
    );

#endif

View code on GitHub
// processthreadsapi.h

DWORD GetCurrentProcessorNumber();
View the official Win32 API reference

NtDoc

No description available.

Win32 API reference (nf-processthreadsapi-getcurrentprocessornumber)

GetCurrentProcessorNumber function

Description

Retrieves the number of the processor the current thread was running on during the call to this function.

Return value

The function returns the current processor number.

Remarks

This function is used to provide information for estimating process performance.

On systems with more than 64 logical processors, the GetCurrentProcessorNumber function returns the processor number within the processor group to which the logical processor is assigned. Use the GetCurrentProcessorNumberEx function to retrieve the processor group and number of the current processor.

See also

Multiple Processors

Process and Thread Functions

Processes