haiku/src/kernel/core/cpu.c
Axel Dörfler c8ec205b7b Include kernel_args.h instead of stage2.h.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4969 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-07 23:12:37 +00:00

44 lines
774 B
C

/* This file contains the cpu functions (init, etc). */
/*
** Copyright 2002, Travis Geiselbrecht. All rights reserved.
** Distributed under the terms of the NewOS License.
*/
// ToDo: fix the atomic_*() functions and possibly move them elsewhere;
// they are exported in libroot.so anyway, so the best place would
// probably there.
#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];
int
cpu_init(kernel_args *ka)
{
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(ka);
}
int
cpu_preboot_init(kernel_args *ka)
{
return arch_cpu_preboot_init(ka);
}