mvp_tips/CPUID/CPUID/CPUCoreRegion.cpp
int CCPUCoreRegion::ComputeNProcs()
    {
     CPUregs regs;
     CurrentProcessor.GetCPUID(1, &regs);
     EBX1b EBX;
     EBX.w = regs.EBX;

     int nprocs = EBX.bits.LogicalProcessors;
     if(nprocs == 0)
        nprocs = 1;
     return nprocs;
    }
/****************************************************************************
*                        CCPUCoreRegion::ComputeNProcs
* Result: int
*       Number of logical processors
****************************************************************************/
:ComputeNProcs
Result: int
Number of logical processors
: ComputeNProcs Result : int Number of logical processors
int CCPUCoreRegion::ComputeNProcs()
    {
     CPUregs regs;
     CurrentProcessor.GetCPUID(1, &regs);
     EBX1b EBX;
     EBX.w = regs.EBX;
     int nprocs = EBX.bits.LogicalProcessors;
     if(nprocs == 0)
        nprocs = 1;
     return nprocs;
    }
int CCPUCoreRegion :: ComputeNProcs ( ) { CPUregs regs ; CurrentProcessor . GetCPUID ( 1 , & regs ) ; EBX1b EBX ; EBX . w = regs . EBX ; int nprocs = EBX . bits . LogicalProcessors ; if ( nprocs == 0 ) nprocs = 1 ; return nprocs ; }
CCPUCoreRegion::ComputeNProcs
Result: int
Number of logical processors
CCPUCoreRegion :: ComputeNProcs Result : int Number of logical processors