haiku/headers/private/kernel/smp.h
Axel Dörfler 74b043d98d Removed execute property that was set accidently (since CVS days).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@11896 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-18 01:50:45 +00:00

46 lines
1.2 KiB
C

/*
** Copyright 2001-2002, Travis Geiselbrecht. All rights reserved.
** Distributed under the terms of the NewOS License.
*/
#ifndef KERNEL_SMP_H
#define KERNEL_SMP_H
#include <KernelExport.h>
struct kernel_args;
// intercpu messages
enum {
SMP_MSG_INVL_PAGE_RANGE = 0,
SMP_MSG_INVL_PAGE_LIST,
SMP_MSG_GLOBAL_INVL_PAGE,
SMP_MSG_RESCHEDULE,
SMP_MSG_CPU_HALT,
SMP_MSG_1,
};
enum {
SMP_MSG_FLAG_ASYNC = 0,
SMP_MSG_FLAG_SYNC,
};
status_t smp_init(struct kernel_args *args);
status_t smp_per_cpu_init(struct kernel_args *args, int32 cpu);
int smp_trap_non_boot_cpus(struct kernel_args *ka, int cpu);
void smp_wake_up_all_non_boot_cpus(void);
void smp_wait_for_ap_cpus(struct kernel_args *ka);
void smp_send_ici(int target_cpu, int message, unsigned long data, unsigned long data2, unsigned long data3, void *data_ptr, int flags);
void smp_send_broadcast_ici(int message, unsigned long data, unsigned long data2, unsigned long data3, void *data_ptr, int flags);
int smp_enable_ici(void);
int smp_disable_ici(void);
int smp_get_num_cpus(void);
void smp_set_num_cpus(int num_cpus);
int smp_get_current_cpu(void);
int smp_intercpu_int_handler(void);
#endif /* KERNEL_SMP_H */