kernel: cleanup and formally define CPU start fn

The "key" parameter is legacy, remove it.

Add a typedef for the expected function pointer type.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
Andrew Boie 2020-01-10 12:51:38 -08:00 committed by Anas Nashif
commit a594ca7c8f
11 changed files with 28 additions and 22 deletions

View file

@ -94,11 +94,11 @@ struct x86_cpuboot x86_cpuboot[] = {
/*
* Send the INIT/STARTUP IPI sequence required to start up CPU 'cpu_num', which
* will enter the kernel at fn(---, arg), running on the specified stack.
* will enter the kernel at fn(arg), running on the specified stack.
*/
void arch_start_cpu(int cpu_num, k_thread_stack_t *stack, int sz,
void (*fn)(int key, void *data), void *arg)
arch_cpustart_t fn, void *arg)
{
u8_t vector = ((unsigned long) x86_ap_start) >> 12;
u8_t apic_id = x86_cpu_loapics[cpu_num];