Test initialisation of MUIA_List_AdjustWidth and MUIA_List_AdjustHeight, and
[AROS.git] / arch / arm-native / kernel / getcpucount.c
blob88f4d614e7255dac721d5ea0aa45b589c704e402
1 /*
2 Copyright © 2015, The AROS Development Team. All rights reserved.
3 $Id$
4 */
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)
15 AROS_LIBFUNC_INIT
17 cpuid_t count;
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;
24 return count;
26 AROS_LIBFUNC_EXIT