diff options
author | jasone <jasone@FreeBSD.org> | 2000-09-07 01:33:02 +0000 |
---|---|---|
committer | jasone <jasone@FreeBSD.org> | 2000-09-07 01:33:02 +0000 |
commit | 769e0f974d8929599ba599ac496510fffc90ff34 (patch) | |
tree | 9387522900085835de81e7830e570ef3f6b3ea80 /sys/amd64/include/pcpu.h | |
parent | acf1927de02afda4855ec278b1128fd9446405ea (diff) | |
download | FreeBSD-src-769e0f974d8929599ba599ac496510fffc90ff34.zip FreeBSD-src-769e0f974d8929599ba599ac496510fffc90ff34.tar.gz |
Major update to the way synchronization is done in the kernel. Highlights
include:
* Mutual exclusion is used instead of spl*(). See mutex(9). (Note: The
alpha port is still in transition and currently uses both.)
* Per-CPU idle processes.
* Interrupts are run in their own separate kernel threads and can be
preempted (i386 only).
Partially contributed by: BSDi (BSD/OS)
Submissions by (at least): cp, dfr, dillon, grog, jake, jhb, sheldonh
Diffstat (limited to 'sys/amd64/include/pcpu.h')
-rw-r--r-- | sys/amd64/include/pcpu.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/sys/amd64/include/pcpu.h b/sys/amd64/include/pcpu.h index 58bd9cf..440da60 100644 --- a/sys/amd64/include/pcpu.h +++ b/sys/amd64/include/pcpu.h @@ -26,6 +26,20 @@ * $FreeBSD$ */ +#ifndef _MACHINE_GLOBALDATA_H_ +#define _MACHINE_GLOBALDATA_H_ + +#include <vm/vm.h> +#include <vm/pmap.h> +#include <machine/pmap.h> +#include <machine/segments.h> +#include <machine/tss.h> + +/* XXX */ +#ifdef KTR_PERCPU +#include <sys/ktr.h> +#endif + /* * This structure maps out the global data that needs to be kept on a * per-cpu basis. genassym uses this to generate offsets for the assembler @@ -41,11 +55,14 @@ struct globaldata { struct privatespace *gd_prvspace; /* self-reference */ struct proc *gd_curproc; + struct proc *gd_prevproc; struct proc *gd_npxproc; struct pcb *gd_curpcb; + struct proc *gd_idleproc; struct timeval gd_switchtime; struct i386tss gd_common_tss; int gd_switchticks; + int gd_intr_nesting_level; struct segment_descriptor gd_common_tssd; struct segment_descriptor *gd_tss_gdt; #ifdef USER_LDT @@ -67,8 +84,22 @@ struct globaldata { unsigned *gd_prv_PADDR1; #endif u_int gd_astpending; + SLIST_ENTRY(globaldata) gd_allcpu; + int gd_witness_spin_check; +#ifdef KTR_PERCPU +#ifdef KTR + volatile int gd_ktr_idx; + char *gd_ktr_buf; + char gd_ktr_buf_data[KTR_SIZE]; +#endif +#endif }; +extern struct globaldata globaldata; + +SLIST_HEAD(cpuhead, globaldata); +extern struct cpuhead cpuhead; + #ifdef SMP /* * This is the upper (0xff800000) address space layout that is per-cpu. @@ -93,3 +124,5 @@ struct privatespace { extern struct privatespace SMP_prvspace[]; #endif + +#endif /* ! _MACHINE_GLOBALDATA_H_ */ |