revert between 56095 -> 55830 in arch
[AROS.git] / arch / all-pc / kernel / getcpucount.c
blob14a75d1a4d691840c3e53c5a6ec1b4041b8611d6
1 /*
2 Copyright © 1995-2017, 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"
11 #include "apic.h"
13 AROS_LH0(unsigned int, KrnGetCPUCount,
14 struct KernelBase *, KernelBase, 40, Kernel)
16 AROS_LIBFUNC_INIT
18 if (!KernelBase->kb_PlatformData)
19 return 0;
21 if (!KernelBase->kb_PlatformData->kb_APIC)
22 return 1;
24 return KernelBase->kb_PlatformData->kb_APIC->apic_count;
26 AROS_LIBFUNC_EXIT