haiku/headers/private/kernel/cpu.h
Axel Dörfler b0d8e689ac Renamed some more init2 routines to init_post_vm() to make it 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).


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

53 lines
1019 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.
*/
#ifndef _KERNEL_CPU_H
#define _KERNEL_CPU_H
#include <smp.h>
#include <timer.h>
#include <boot/kernel_args.h>
/* CPU local data structure */
typedef union cpu_ent {
struct {
int cpu_num;
// thread.c: used to force a reschedule at quantum expiration time
int preempted;
timer quantum_timer;
} info;
uint32 align[16];
} cpu_ent;
/**
* Defined in core/cpu.c
*/
extern cpu_ent cpu[MAX_BOOT_CPUS];
#ifdef __cplusplus
extern "C" {
#endif
status_t cpu_preboot_init(struct kernel_args *args);
status_t cpu_init(struct kernel_args *args);
status_t cpu_init_post_vm(struct kernel_args *args);
cpu_ent *get_cpu_struct(void);
extern inline cpu_ent *get_cpu_struct(void) { return &cpu[smp_get_current_cpu()]; }
#ifdef __cplusplus
}
#endif
#endif /* _KERNEL_CPU_H */