2 Copyright © 2015, The AROS Development Team. All rights reserved.
6 #include <aros/kernel.h>
7 #include <aros/libcall.h>
9 #include "kernel_base.h"
10 #include "kernel_intern.h"
12 AROS_LH0(cpuid_t
, KrnGetCPUCount
,
13 struct KernelBase
*, KernelBase
, 36, Kernel
)
19 count
= __arm_arosintern
.ARMI_AffinityMask
20 - ((__arm_arosintern
.ARMI_AffinityMask
>> 1) & 0x55555555);
21 count
= (count
& 0x33333333) + ((count
>> 2) & 0x33333333);
22 return (((count
+ (count
>> 4)) & 0x0F0F0F0F) * 0x01010101) >> 24;