2 Copyright © 2017, The AROS Development Team. All rights reserved.
8 #include <proto/exec.h>
10 #include <aros/kernel.h>
11 #include <aros/libcall.h>
13 #include "kernel_base.h"
14 #include "kernel_intern.h"
16 AROS_LH1(void, KrnFreeCPUMask
,
17 AROS_LHA(void *, mask
, A0
),
18 struct KernelBase
*, KernelBase
, 43, Kernel
)
22 struct PlatformData
*pdata
= KernelBase
->kb_PlatformData
;
23 struct APICData
*apicData
;
26 if ((IPTR
)mask
== TASKAFFINITY_ANY
)
29 if ((pdata
) && (pdata
->kb_APIC
))
31 apicData
= pdata
->kb_APIC
;
33 count
= apicData
->apic_count
/ 32;
35 if ((count
* 32) < apicData
->apic_count
)
38 FreeMem(mask
, count
* sizeof(ULONG
));