add basic getcpucount & delint
[AROS.git] / arch / arm-native / kernel / getcpucount.c
blob5ea8abe55d05a6648784e479d99d42c558c83868
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(unsigned int, KrnGetCPUCount,
13 struct KernelBase *, KernelBase, 36, Kernel)
15 AROS_LIBFUNC_INIT
17 uint32_t count = 0, mask;
19 for (mask = __arm_affinitymask; mask > 0 ; mask >> 1)
21 if (mask & 1)
22 count++;
24 return count;
26 AROS_LIBFUNC_EXIT