diff options
Diffstat (limited to 'sys/powerpc/include')
-rw-r--r-- | sys/powerpc/include/globaldata.h | 19 | ||||
-rw-r--r-- | sys/powerpc/include/globals.h | 10 | ||||
-rw-r--r-- | sys/powerpc/include/pcpu.h | 19 | ||||
-rw-r--r-- | sys/powerpc/include/proc.h | 3 |
4 files changed, 30 insertions, 21 deletions
diff --git a/sys/powerpc/include/globaldata.h b/sys/powerpc/include/globaldata.h index b51592a..c95a725 100644 --- a/sys/powerpc/include/globaldata.h +++ b/sys/powerpc/include/globaldata.h @@ -44,15 +44,16 @@ * point at the globaldata structure. */ struct globaldata { - struct proc *gd_curproc; /* current process */ - struct proc *gd_idleproc; /* idle process */ - struct proc *gd_fpcurproc; /* fp state owner */ - struct pcb *gd_curpcb; /* current pcb */ - struct timeval gd_switchtime; - int gd_switchticks; - u_int gd_cpuid; /* this cpu number */ - u_int gd_other_cpus; /* all other cpus */ - int gd_inside_intr; + struct thread *gd_curthread; /* current thread */ + struct proc *gd_idleproc; /* idle process */ + struct thread *gd_fpcurthread; /* fp state owner */ + struct proc *gd_fpcurproc; /* fp state owner */ + struct pcb *gd_curpcb; /* current pcb */ + struct timeval gd_switchtime; + int gd_switchticks; + u_int gd_cpuid; /* this cpu number */ + u_int gd_other_cpus; /* all other cpus */ + int gd_inside_intr; u_int32_t gd_next_asn; /* next ASN to allocate */ u_int32_t gd_current_asngen; /* ASN rollover check */ u_int32_t gd_intr_nesting_level; /* interrupt recursion */ diff --git a/sys/powerpc/include/globals.h b/sys/powerpc/include/globals.h index 26c21e8..6aa1a7a 100644 --- a/sys/powerpc/include/globals.h +++ b/sys/powerpc/include/globals.h @@ -45,12 +45,16 @@ * other hand, kernel modules should always use these macros to maintain * portability between UP and SMP kernels. */ -#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) + #define idleproc PCPU_GET(idleproc) #define curpcb PCPU_GET(curpcb) #define fpcurproc PCPU_GET(fpcurproc) +#define fpcurthread PCPU_GET(fpcurthread) #define switchtime PCPU_GET(switchtime) #define switchticks PCPU_GET(switchticks) #define witness_spin_check PCPU_GET(witness_spin_check) diff --git a/sys/powerpc/include/pcpu.h b/sys/powerpc/include/pcpu.h index b51592a..c95a725 100644 --- a/sys/powerpc/include/pcpu.h +++ b/sys/powerpc/include/pcpu.h @@ -44,15 +44,16 @@ * point at the globaldata structure. */ struct globaldata { - struct proc *gd_curproc; /* current process */ - struct proc *gd_idleproc; /* idle process */ - struct proc *gd_fpcurproc; /* fp state owner */ - struct pcb *gd_curpcb; /* current pcb */ - struct timeval gd_switchtime; - int gd_switchticks; - u_int gd_cpuid; /* this cpu number */ - u_int gd_other_cpus; /* all other cpus */ - int gd_inside_intr; + struct thread *gd_curthread; /* current thread */ + struct proc *gd_idleproc; /* idle process */ + struct thread *gd_fpcurthread; /* fp state owner */ + struct proc *gd_fpcurproc; /* fp state owner */ + struct pcb *gd_curpcb; /* current pcb */ + struct timeval gd_switchtime; + int gd_switchticks; + u_int gd_cpuid; /* this cpu number */ + u_int gd_other_cpus; /* all other cpus */ + int gd_inside_intr; u_int32_t gd_next_asn; /* next ASN to allocate */ u_int32_t gd_current_asngen; /* ASN rollover check */ u_int32_t gd_intr_nesting_level; /* interrupt recursion */ diff --git a/sys/powerpc/include/proc.h b/sys/powerpc/include/proc.h index 21b9b32..33eb778 100644 --- a/sys/powerpc/include/proc.h +++ b/sys/powerpc/include/proc.h @@ -37,5 +37,8 @@ /* * Machine-dependent part of the proc structure */ +struct mdthread { +}; + struct mdproc { }; |