]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - sys/sys/smp.h
Add INTR_TYPE_AV so that we can get to the PI_AV priority in the ithread
[FreeBSD/FreeBSD.git] / sys / sys / smp.h
1 /*
2  * ----------------------------------------------------------------------------
3  * "THE BEER-WARE LICENSE" (Revision 42):
4  * <phk@FreeBSD.org> wrote this file.  As long as you retain this notice you
5  * can do whatever you want with this stuff. If we meet some day, and you think
6  * this stuff is worth it, you can buy me a beer in return.   Poul-Henning Kamp
7  * ----------------------------------------------------------------------------
8  *
9  * $FreeBSD$
10  */
11
12 #ifndef _SYS_SMP_H_
13 #define _SYS_SMP_H_
14
15 #ifdef _KERNEL
16 #include <machine/smp.h>
17
18 #ifndef LOCORE
19
20 #ifdef SMP
21 extern void (*cpustop_restartfunc)(void);
22 extern int mp_ncpus;
23 extern int smp_active;
24 extern int smp_started;
25 extern int smp_cpus;
26 extern u_int all_cpus;
27 extern volatile u_int started_cpus;
28 extern volatile u_int stopped_cpus;
29
30 /*
31  * Machine dependent functions used to initialize MP support.
32  *
33  * The cpu_mp_probe() should check to see if MP support is present and return
34  * zero if it is not or non-zero if it is.  If MP support is present, then
35  * cpu_mp_start() will be called so that MP can be enabled.  This function
36  * should do things such as startup secondary processors.  It should also
37  * setup mp_ncpus, all_cpus, and smp_cpus.  It should also ensure that
38  * smp_active and smp_started are initialized at the appropriate time.
39  * Once cpu_mp_start() returns, machine independent MP startup code will be
40  * executed and a simple message will be output to the console.  Finally,
41  * cpu_mp_announce() will be called so that machine dependent messages about
42  * the MP support may be output to the console if desired.
43  */
44 void    cpu_mp_announce(void);
45 int     cpu_mp_probe(void);
46 void    cpu_mp_start(void);
47
48 void    forward_signal(struct proc *);
49 void    forward_roundrobin(void);
50 int     restart_cpus(u_int);
51 int     stop_cpus(u_int);
52 void    smp_rendezvous_action(void);
53 void    smp_rendezvous(void (*)(void *), 
54                        void (*)(void *),
55                        void (*)(void *),
56                        void *arg);
57
58 #endif /* SMP */
59 #endif /* !LOCORE */
60 #endif /* _KERNEL */
61 #endif /* _SYS_SMP_H_ */