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(unsigned int, KrnGetCPUCount
,
13 struct KernelBase
*, KernelBase
, 36, Kernel
)
19 count
= __arm_affinitymask
- ((__arm_affinitymask
>> 1) & 0x55555555);
20 count
= (count
& 0x33333333) + ((count
>> 2) & 0x33333333);
21 return (((count
+ (count
>> 4)) & 0x0F0F0F0F) * 0x01010101) >> 24;