haiku/src/kernel/core/cpu.c
Axel Dörfler d330cc09e2 Renamed some init2() functions to init_post_vm() to make clearer when and why
they are called.
Introduced a cpu_init_post_vm() that will now call arch_init_post_vm() instead
of letting main() doing it.
Fixed some return types (mostly from int to status_t).
Some minor other cleanup.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9439 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-21 01:45:43 +00:00

50 lines
839 B
C

/*
** Copyright 2002-2004, The Haiku Team. All rights reserved.
** Distributed under the terms of the Haiku License.
**
** Copyright 2002, Travis Geiselbrecht. All rights reserved.
** Distributed under the terms of the NewOS License.
*/
/* This file contains the cpu functions (init, etc). */
#include <kernel.h>
#include <cpu.h>
#include <vm.h>
#include <arch/cpu.h>
#include <boot/kernel_args.h>
#include <string.h>
/* global per-cpu structure */
cpu_ent cpu[MAX_BOOT_CPUS];
status_t
cpu_init(kernel_args *args)
{
int i;
memset(cpu, 0, sizeof(cpu));
for (i = 0; i < MAX_BOOT_CPUS; i++) {
cpu[i].info.cpu_num = i;
}
return arch_cpu_init(args);
}
status_t
cpu_init_post_vm(kernel_args *args)
{
return arch_cpu_init_post_vm(args);
}
status_t
cpu_preboot_init(kernel_args *args)
{
return arch_cpu_preboot_init(args);
}