summaryrefslogtreecommitdiffstats
path: root/sys/sparc64/include
diff options
context:
space:
mode:
authorjulian <julian@FreeBSD.org>2001-09-12 08:38:13 +0000
committerjulian <julian@FreeBSD.org>2001-09-12 08:38:13 +0000
commit5596676e6c6c1e81e899cd0531f9b1c28a292669 (patch)
treeb1a19fcdf05759281fab0d89efb13f0fdf42102e /sys/sparc64/include
parent83e00d4274950d2b531c24692cd123538ffbddb9 (diff)
downloadFreeBSD-src-5596676e6c6c1e81e899cd0531f9b1c28a292669.zip
FreeBSD-src-5596676e6c6c1e81e899cd0531f9b1c28a292669.tar.gz
KSE Milestone 2
Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process. Sorry john! (your next MFC will be a doosie!) Reviewed by: peter@freebsd.org, dillon@freebsd.org X-MFC after: ha ha ha ha
Diffstat (limited to 'sys/sparc64/include')
-rw-r--r--sys/sparc64/include/cpu.h4
-rw-r--r--sys/sparc64/include/fp.h4
-rw-r--r--sys/sparc64/include/frame.h6
-rw-r--r--sys/sparc64/include/globaldata.h4
-rw-r--r--sys/sparc64/include/globals.h8
-rw-r--r--sys/sparc64/include/md_var.h8
-rw-r--r--sys/sparc64/include/param.h6
-rw-r--r--sys/sparc64/include/pcpu.h4
-rw-r--r--sys/sparc64/include/proc.h3
-rw-r--r--sys/sparc64/include/reg.h8
10 files changed, 32 insertions, 23 deletions
diff --git a/sys/sparc64/include/cpu.h b/sys/sparc64/include/cpu.h
index 3a84287..91e04fa 100644
--- a/sys/sparc64/include/cpu.h
+++ b/sys/sparc64/include/cpu.h
@@ -50,8 +50,8 @@
#define TRAPF_PC(tfp) ((tfp)->tf_tpc)
#define TRAPF_USERMODE(tfp) (((tfp)->tf_tstate & TSTATE_PRIV) == 0)
-#define cpu_getstack(p) ((p)->p_frame->tf_sp)
-#define cpu_setstack(p, sp) ((p)->p_frame->tf_sp = (sp))
+#define cpu_getstack(td) ((td)->td_frame->tf_sp)
+#define cpu_setstack(td, sp) ((td)->td_frame->tf_sp = (sp))
/*
* CTL_MACHDEP definitions.
diff --git a/sys/sparc64/include/fp.h b/sys/sparc64/include/fp.h
index 6305c2b..699dba8 100644
--- a/sys/sparc64/include/fp.h
+++ b/sys/sparc64/include/fp.h
@@ -75,8 +75,8 @@ struct fpstate {
u_long fp_fprs;
};
-void fp_init_proc(struct pcb *);
-int fp_enable_proc(struct proc *);
+void fp_init_thread(struct pcb *);
+int fp_enable_thread(struct thread *);
/*
* Note: The pointers passed to the next two functions must be aligned on
* 64 byte boundaries.
diff --git a/sys/sparc64/include/frame.h b/sys/sparc64/include/frame.h
index 9d1c0c6..5151ef2 100644
--- a/sys/sparc64/include/frame.h
+++ b/sys/sparc64/include/frame.h
@@ -80,10 +80,10 @@ struct rwindow {
u_long rw_in[8];
};
-struct proc;
+struct thread;
-int rwindow_save(struct proc *p);
-int rwindow_load(struct proc *p, struct trapframe *tf, int n);
+int rwindow_save(struct thread *td);
+int rwindow_load(struct thread *td, struct trapframe *tf, int n);
int kdb_trap(struct trapframe *tf);
diff --git a/sys/sparc64/include/globaldata.h b/sys/sparc64/include/globaldata.h
index 69a7ab2..325bd08 100644
--- a/sys/sparc64/include/globaldata.h
+++ b/sys/sparc64/include/globaldata.h
@@ -46,8 +46,8 @@
* point at the globaldata structure.
*/
struct globaldata {
- struct proc *gd_curproc; /* current process */
- struct proc *gd_idleproc; /* idle process */
+ struct thread *gd_curthread; /* current thread */
+ struct thread *gd_idlethread; /* idle thread */
struct pcb *gd_curpcb; /* current pcb */
struct timeval gd_switchtime;
int gd_switchticks;
diff --git a/sys/sparc64/include/globals.h b/sys/sparc64/include/globals.h
index 01d48a8..951d1e2 100644
--- a/sys/sparc64/include/globals.h
+++ b/sys/sparc64/include/globals.h
@@ -40,9 +40,11 @@ register struct globaldata *globalp __asm__("%g7");
#define PCPU_PTR(member) (&GLOBALP->gd_ ## member)
#define PCPU_SET(member,value) (GLOBALP->gd_ ## member = (value))
-#define CURPROC PCPU_GET(curproc)
-#define CURTHD PCPU_GET(curproc) /* temporary */
-#define curproc PCPU_GET(curproc)
+#define curthread PCPU_GET(curthread)
+#define CURPROC (curthread->td_proc)
+#define curproc (curthread->td_proc)
+#define curksegrp (curthread->td_ksegrp)
+#define curkse (curthread->td_kse)
#endif /* _KERNEL */
diff --git a/sys/sparc64/include/md_var.h b/sys/sparc64/include/md_var.h
index d411cf4..7a0733b 100644
--- a/sys/sparc64/include/md_var.h
+++ b/sys/sparc64/include/md_var.h
@@ -39,14 +39,14 @@ extern int Maxmem;
struct dbreg;
struct fpreg;
-struct proc;
+struct thread;
struct reg;
void cpu_halt(void);
void cpu_reset(void);
-int fill_dbregs(struct proc *p, struct dbreg *dbregs);
-int fill_fpregs(struct proc *p, struct fpreg *fpregs);
-int fill_regs(struct proc *p, struct reg *regs);
+int fill_dbregs(struct thread *td, struct dbreg *dbregs);
+int fill_fpregs(struct thread *td, struct fpreg *fpregs);
+int fill_regs(struct thread *td, struct reg *regs);
void swi_vm(void *v);
#endif /* !_MACHINE_MD_VAR_H_ */
diff --git a/sys/sparc64/include/param.h b/sys/sparc64/include/param.h
index e669f45..2f8d6a6 100644
--- a/sys/sparc64/include/param.h
+++ b/sys/sparc64/include/param.h
@@ -116,7 +116,11 @@
#define MAXDUMPPGS (DFLTPHYS/PAGE_SIZE)
#define IOPAGES 2 /* pages of i/o permission bitmap */
-#define UPAGES 4 /* pages of u-area */
+
+#define KSTACK_PAGES 4 /* pages of kernel stack (with pcb) */
+#define UAREA_PAGES 1 /* pages of user area */
+
+/* #define KSTACK_GUARD */ /* compile in kstack guard page */
/*
* Constants related to network buffer management.
diff --git a/sys/sparc64/include/pcpu.h b/sys/sparc64/include/pcpu.h
index 69a7ab2..325bd08 100644
--- a/sys/sparc64/include/pcpu.h
+++ b/sys/sparc64/include/pcpu.h
@@ -46,8 +46,8 @@
* point at the globaldata structure.
*/
struct globaldata {
- struct proc *gd_curproc; /* current process */
- struct proc *gd_idleproc; /* idle process */
+ struct thread *gd_curthread; /* current thread */
+ struct thread *gd_idlethread; /* idle thread */
struct pcb *gd_curpcb; /* current pcb */
struct timeval gd_switchtime;
int gd_switchticks;
diff --git a/sys/sparc64/include/proc.h b/sys/sparc64/include/proc.h
index c6df75d..84ada25 100644
--- a/sys/sparc64/include/proc.h
+++ b/sys/sparc64/include/proc.h
@@ -41,6 +41,9 @@
#include <machine/globals.h>
#include <machine/tte.h>
+struct mdthread {
+};
+
struct mdproc {
};
diff --git a/sys/sparc64/include/reg.h b/sys/sparc64/include/reg.h
index b0b7a61..bd3414c 100644
--- a/sys/sparc64/include/reg.h
+++ b/sys/sparc64/include/reg.h
@@ -39,10 +39,10 @@ struct dbreg {
};
#ifdef _KERNEL
-int set_fpregs(struct proc *p, struct fpreg *fpregs);
-int set_regs(struct proc *p, struct reg *regs);
-void setregs(struct proc *p, u_long e, u_long s, u_long ps);
-int set_dbregs(struct proc *p, struct dbreg *dbregs);
+int set_fpregs(struct thread *td, struct fpreg *fpregs);
+int set_regs(struct thread *td, struct reg *regs);
+void setregs(struct thread *td, u_long e, u_long s, u_long ps);
+int set_dbregs(struct thread *td, struct dbreg *dbregs);
#endif
#endif /* !_MACHINE_REG_H_ */
OpenPOWER on IntegriCloud