style(9) and make consistent across platforms
This commit is contained in:
parent
cc00d33c5f
commit
589278dbae
@ -1,5 +1,6 @@
|
||||
/*-
|
||||
* Copyright (c) 1999 Luoqi Chen <luoqi@freebsd.org>
|
||||
* Copyright (c) Peter Wemm <peter@netplex.com.au>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -43,26 +44,26 @@
|
||||
* point at the globaldata structure.
|
||||
*/
|
||||
struct globaldata {
|
||||
struct alpha_pcb gd_idlepcb; /* pcb for idling */
|
||||
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 */
|
||||
struct alpha_pcb gd_idlepcb; /* pcb for idling */
|
||||
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 */
|
||||
u_int64_t gd_idlepcbphys; /* pa of gd_idlepcb */
|
||||
u_int64_t gd_pending_ipis; /* pending IPI events */
|
||||
u_int32_t gd_next_asn; /* next ASN to allocate */
|
||||
u_int32_t gd_current_asngen; /* ASN rollover check */
|
||||
|
||||
SLIST_ENTRY(globaldata) gd_allcpu;
|
||||
struct lock_list_entry *gd_spinlocks;
|
||||
struct lock_list_entry *gd_spinlocks;
|
||||
#ifdef KTR_PERCPU
|
||||
volatile int gd_ktr_idx; /* Index into trace table */
|
||||
char *gd_ktr_buf;
|
||||
char gd_ktr_buf_data[0];
|
||||
char *gd_ktr_buf;
|
||||
char gd_ktr_buf_data[0];
|
||||
#endif
|
||||
};
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
/*-
|
||||
* Copyright (c) 1999 Luoqi Chen <luoqi@freebsd.org>
|
||||
* Copyright (c) Peter Wemm <peter@netplex.com.au>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -43,26 +44,26 @@
|
||||
* point at the globaldata structure.
|
||||
*/
|
||||
struct globaldata {
|
||||
struct alpha_pcb gd_idlepcb; /* pcb for idling */
|
||||
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 */
|
||||
struct alpha_pcb gd_idlepcb; /* pcb for idling */
|
||||
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 */
|
||||
u_int64_t gd_idlepcbphys; /* pa of gd_idlepcb */
|
||||
u_int64_t gd_pending_ipis; /* pending IPI events */
|
||||
u_int32_t gd_next_asn; /* next ASN to allocate */
|
||||
u_int32_t gd_current_asngen; /* ASN rollover check */
|
||||
|
||||
SLIST_ENTRY(globaldata) gd_allcpu;
|
||||
struct lock_list_entry *gd_spinlocks;
|
||||
struct lock_list_entry *gd_spinlocks;
|
||||
#ifdef KTR_PERCPU
|
||||
volatile int gd_ktr_idx; /* Index into trace table */
|
||||
char *gd_ktr_buf;
|
||||
char gd_ktr_buf_data[0];
|
||||
char *gd_ktr_buf;
|
||||
char gd_ktr_buf_data[0];
|
||||
#endif
|
||||
};
|
||||
|
||||
|
@ -29,6 +29,8 @@
|
||||
#ifndef _MACHINE_GLOBALDATA_H_
|
||||
#define _MACHINE_GLOBALDATA_H_
|
||||
|
||||
#ifdef _KERNEL
|
||||
|
||||
#include <machine/segments.h>
|
||||
#include <machine/tss.h>
|
||||
|
||||
@ -50,27 +52,25 @@
|
||||
* other processors"
|
||||
*/
|
||||
struct globaldata {
|
||||
struct globaldata *gd_prvspace; /* self-reference */
|
||||
struct proc *gd_curproc;
|
||||
struct proc *gd_npxproc;
|
||||
struct pcb *gd_curpcb;
|
||||
struct proc *gd_idleproc;
|
||||
struct timeval gd_switchtime;
|
||||
struct i386tss gd_common_tss;
|
||||
int gd_switchticks;
|
||||
struct segment_descriptor gd_common_tssd;
|
||||
struct segment_descriptor *gd_tss_gdt;
|
||||
int gd_currentldt;
|
||||
u_int gd_cpuid;
|
||||
u_int gd_other_cpus;
|
||||
struct globaldata *gd_prvspace; /* self-reference */
|
||||
struct proc *gd_curproc; /* current process */
|
||||
struct proc *gd_idleproc; /* idle process */
|
||||
struct proc *gd_npxproc;
|
||||
struct pcb *gd_curpcb; /* current pcb */
|
||||
struct timeval gd_switchtime;
|
||||
struct i386tss gd_common_tss;
|
||||
int gd_switchticks;
|
||||
struct segment_descriptor gd_common_tssd;
|
||||
struct segment_descriptor *gd_tss_gdt;
|
||||
int gd_currentldt;
|
||||
u_int gd_cpuid; /* this cpu number */
|
||||
u_int gd_other_cpus; /* all other cpus */
|
||||
SLIST_ENTRY(globaldata) gd_allcpu;
|
||||
struct lock_list_entry *gd_spinlocks;
|
||||
struct lock_list_entry *gd_spinlocks;
|
||||
#ifdef KTR_PERCPU
|
||||
#ifdef KTR
|
||||
volatile int gd_ktr_idx;
|
||||
char *gd_ktr_buf;
|
||||
char gd_ktr_buf_data[KTR_SIZE];
|
||||
#endif
|
||||
volatile int gd_ktr_idx; /* Index into trace table */
|
||||
char *gd_ktr_buf;
|
||||
char gd_ktr_buf_data[KTR_SIZE];
|
||||
#endif
|
||||
};
|
||||
|
||||
@ -82,11 +82,11 @@ struct globaldata {
|
||||
*/
|
||||
struct privatespace {
|
||||
/* page 0 - data page */
|
||||
struct globaldata globaldata;
|
||||
char __filler0[PAGE_SIZE - sizeof(struct globaldata)];
|
||||
struct globaldata globaldata;
|
||||
char __filler0[PAGE_SIZE - sizeof(struct globaldata)];
|
||||
|
||||
/* page 1 - idle stack (UPAGES pages) */
|
||||
char idlestack[UPAGES * PAGE_SIZE];
|
||||
char idlestack[UPAGES * PAGE_SIZE];
|
||||
/* page 1+UPAGES... */
|
||||
};
|
||||
|
||||
@ -94,4 +94,6 @@ extern struct privatespace SMP_prvspace[];
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* _KERNEL */
|
||||
|
||||
#endif /* ! _MACHINE_GLOBALDATA_H_ */
|
||||
|
@ -29,6 +29,8 @@
|
||||
#ifndef _MACHINE_GLOBALDATA_H_
|
||||
#define _MACHINE_GLOBALDATA_H_
|
||||
|
||||
#ifdef _KERNEL
|
||||
|
||||
#include <machine/segments.h>
|
||||
#include <machine/tss.h>
|
||||
|
||||
@ -50,27 +52,25 @@
|
||||
* other processors"
|
||||
*/
|
||||
struct globaldata {
|
||||
struct globaldata *gd_prvspace; /* self-reference */
|
||||
struct proc *gd_curproc;
|
||||
struct proc *gd_npxproc;
|
||||
struct pcb *gd_curpcb;
|
||||
struct proc *gd_idleproc;
|
||||
struct timeval gd_switchtime;
|
||||
struct i386tss gd_common_tss;
|
||||
int gd_switchticks;
|
||||
struct segment_descriptor gd_common_tssd;
|
||||
struct segment_descriptor *gd_tss_gdt;
|
||||
int gd_currentldt;
|
||||
u_int gd_cpuid;
|
||||
u_int gd_other_cpus;
|
||||
struct globaldata *gd_prvspace; /* self-reference */
|
||||
struct proc *gd_curproc; /* current process */
|
||||
struct proc *gd_idleproc; /* idle process */
|
||||
struct proc *gd_npxproc;
|
||||
struct pcb *gd_curpcb; /* current pcb */
|
||||
struct timeval gd_switchtime;
|
||||
struct i386tss gd_common_tss;
|
||||
int gd_switchticks;
|
||||
struct segment_descriptor gd_common_tssd;
|
||||
struct segment_descriptor *gd_tss_gdt;
|
||||
int gd_currentldt;
|
||||
u_int gd_cpuid; /* this cpu number */
|
||||
u_int gd_other_cpus; /* all other cpus */
|
||||
SLIST_ENTRY(globaldata) gd_allcpu;
|
||||
struct lock_list_entry *gd_spinlocks;
|
||||
struct lock_list_entry *gd_spinlocks;
|
||||
#ifdef KTR_PERCPU
|
||||
#ifdef KTR
|
||||
volatile int gd_ktr_idx;
|
||||
char *gd_ktr_buf;
|
||||
char gd_ktr_buf_data[KTR_SIZE];
|
||||
#endif
|
||||
volatile int gd_ktr_idx; /* Index into trace table */
|
||||
char *gd_ktr_buf;
|
||||
char gd_ktr_buf_data[KTR_SIZE];
|
||||
#endif
|
||||
};
|
||||
|
||||
@ -82,11 +82,11 @@ struct globaldata {
|
||||
*/
|
||||
struct privatespace {
|
||||
/* page 0 - data page */
|
||||
struct globaldata globaldata;
|
||||
char __filler0[PAGE_SIZE - sizeof(struct globaldata)];
|
||||
struct globaldata globaldata;
|
||||
char __filler0[PAGE_SIZE - sizeof(struct globaldata)];
|
||||
|
||||
/* page 1 - idle stack (UPAGES pages) */
|
||||
char idlestack[UPAGES * PAGE_SIZE];
|
||||
char idlestack[UPAGES * PAGE_SIZE];
|
||||
/* page 1+UPAGES... */
|
||||
};
|
||||
|
||||
@ -94,4 +94,6 @@ extern struct privatespace SMP_prvspace[];
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* _KERNEL */
|
||||
|
||||
#endif /* ! _MACHINE_GLOBALDATA_H_ */
|
||||
|
@ -29,6 +29,8 @@
|
||||
#ifndef _MACHINE_GLOBALDATA_H_
|
||||
#define _MACHINE_GLOBALDATA_H_
|
||||
|
||||
#ifdef _KERNEL
|
||||
|
||||
#include <machine/segments.h>
|
||||
#include <machine/tss.h>
|
||||
|
||||
@ -50,27 +52,25 @@
|
||||
* other processors"
|
||||
*/
|
||||
struct globaldata {
|
||||
struct globaldata *gd_prvspace; /* self-reference */
|
||||
struct proc *gd_curproc;
|
||||
struct proc *gd_npxproc;
|
||||
struct pcb *gd_curpcb;
|
||||
struct proc *gd_idleproc;
|
||||
struct timeval gd_switchtime;
|
||||
struct i386tss gd_common_tss;
|
||||
int gd_switchticks;
|
||||
struct segment_descriptor gd_common_tssd;
|
||||
struct segment_descriptor *gd_tss_gdt;
|
||||
int gd_currentldt;
|
||||
u_int gd_cpuid;
|
||||
u_int gd_other_cpus;
|
||||
struct globaldata *gd_prvspace; /* self-reference */
|
||||
struct proc *gd_curproc; /* current process */
|
||||
struct proc *gd_idleproc; /* idle process */
|
||||
struct proc *gd_npxproc;
|
||||
struct pcb *gd_curpcb; /* current pcb */
|
||||
struct timeval gd_switchtime;
|
||||
struct i386tss gd_common_tss;
|
||||
int gd_switchticks;
|
||||
struct segment_descriptor gd_common_tssd;
|
||||
struct segment_descriptor *gd_tss_gdt;
|
||||
int gd_currentldt;
|
||||
u_int gd_cpuid; /* this cpu number */
|
||||
u_int gd_other_cpus; /* all other cpus */
|
||||
SLIST_ENTRY(globaldata) gd_allcpu;
|
||||
struct lock_list_entry *gd_spinlocks;
|
||||
struct lock_list_entry *gd_spinlocks;
|
||||
#ifdef KTR_PERCPU
|
||||
#ifdef KTR
|
||||
volatile int gd_ktr_idx;
|
||||
char *gd_ktr_buf;
|
||||
char gd_ktr_buf_data[KTR_SIZE];
|
||||
#endif
|
||||
volatile int gd_ktr_idx; /* Index into trace table */
|
||||
char *gd_ktr_buf;
|
||||
char gd_ktr_buf_data[KTR_SIZE];
|
||||
#endif
|
||||
};
|
||||
|
||||
@ -82,11 +82,11 @@ struct globaldata {
|
||||
*/
|
||||
struct privatespace {
|
||||
/* page 0 - data page */
|
||||
struct globaldata globaldata;
|
||||
char __filler0[PAGE_SIZE - sizeof(struct globaldata)];
|
||||
struct globaldata globaldata;
|
||||
char __filler0[PAGE_SIZE - sizeof(struct globaldata)];
|
||||
|
||||
/* page 1 - idle stack (UPAGES pages) */
|
||||
char idlestack[UPAGES * PAGE_SIZE];
|
||||
char idlestack[UPAGES * PAGE_SIZE];
|
||||
/* page 1+UPAGES... */
|
||||
};
|
||||
|
||||
@ -94,4 +94,6 @@ extern struct privatespace SMP_prvspace[];
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* _KERNEL */
|
||||
|
||||
#endif /* ! _MACHINE_GLOBALDATA_H_ */
|
||||
|
@ -1,5 +1,6 @@
|
||||
/*-
|
||||
* Copyright (c) 1999 Luoqi Chen <luoqi@freebsd.org>
|
||||
* Copyright (c) Peter Wemm <peter@netplex.com.au>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -43,26 +44,26 @@
|
||||
* 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 */
|
||||
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 */
|
||||
u_int64_t gd_idlepcbphys; /* pa of gd_idlepcb */
|
||||
u_int64_t gd_pending_ipis; /* pending IPI events */
|
||||
struct pmap *gd_current_pmap; /* which pmap is active */
|
||||
struct pmap *gd_current_pmap; /* which pmap is active */
|
||||
u_int32_t gd_next_asn; /* next ASN to allocate */
|
||||
u_int32_t gd_current_asngen; /* ASN rollover check */
|
||||
|
||||
SLIST_ENTRY(globaldata) gd_allcpu;
|
||||
struct lock_list_entry *gd_spinlocks;
|
||||
struct lock_list_entry *gd_spinlocks;
|
||||
#ifdef KTR_PERCPU
|
||||
volatile int gd_ktr_idx; /* Index into trace table */
|
||||
char *gd_ktr_buf;
|
||||
char gd_ktr_buf_data[0];
|
||||
char *gd_ktr_buf;
|
||||
char gd_ktr_buf_data[0];
|
||||
#endif
|
||||
};
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
/*-
|
||||
* Copyright (c) 1999 Luoqi Chen <luoqi@freebsd.org>
|
||||
* Copyright (c) Peter Wemm <peter@netplex.com.au>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -43,26 +44,26 @@
|
||||
* 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 */
|
||||
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 */
|
||||
u_int64_t gd_idlepcbphys; /* pa of gd_idlepcb */
|
||||
u_int64_t gd_pending_ipis; /* pending IPI events */
|
||||
struct pmap *gd_current_pmap; /* which pmap is active */
|
||||
struct pmap *gd_current_pmap; /* which pmap is active */
|
||||
u_int32_t gd_next_asn; /* next ASN to allocate */
|
||||
u_int32_t gd_current_asngen; /* ASN rollover check */
|
||||
|
||||
SLIST_ENTRY(globaldata) gd_allcpu;
|
||||
struct lock_list_entry *gd_spinlocks;
|
||||
struct lock_list_entry *gd_spinlocks;
|
||||
#ifdef KTR_PERCPU
|
||||
volatile int gd_ktr_idx; /* Index into trace table */
|
||||
char *gd_ktr_buf;
|
||||
char gd_ktr_buf_data[0];
|
||||
char *gd_ktr_buf;
|
||||
char gd_ktr_buf_data[0];
|
||||
#endif
|
||||
};
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
/*-
|
||||
* Copyright (c) 1999 Luoqi Chen <luoqi@freebsd.org>
|
||||
* Copyright (c) Peter Wemm <peter@netplex.com.au>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -43,27 +44,25 @@
|
||||
* 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 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;
|
||||
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 */
|
||||
|
||||
SLIST_ENTRY(globaldata) gd_allcpu;
|
||||
struct lock_list_entry *gd_spinlocks;
|
||||
struct lock_list_entry *gd_spinlocks;
|
||||
#ifdef KTR_PERCPU
|
||||
#ifdef KTR
|
||||
volatile int gd_ktr_idx; /* Index into trace table */
|
||||
char *gd_ktr_buf;
|
||||
char gd_ktr_buf_data[KTR_SIZE];
|
||||
#endif
|
||||
char *gd_ktr_buf;
|
||||
char gd_ktr_buf_data[KTR_SIZE];
|
||||
#endif
|
||||
};
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
/*-
|
||||
* Copyright (c) 1999 Luoqi Chen <luoqi@freebsd.org>
|
||||
* Copyright (c) Peter Wemm <peter@netplex.com.au>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -43,27 +44,25 @@
|
||||
* 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 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;
|
||||
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 */
|
||||
|
||||
SLIST_ENTRY(globaldata) gd_allcpu;
|
||||
struct lock_list_entry *gd_spinlocks;
|
||||
struct lock_list_entry *gd_spinlocks;
|
||||
#ifdef KTR_PERCPU
|
||||
#ifdef KTR
|
||||
volatile int gd_ktr_idx; /* Index into trace table */
|
||||
char *gd_ktr_buf;
|
||||
char gd_ktr_buf_data[KTR_SIZE];
|
||||
#endif
|
||||
char *gd_ktr_buf;
|
||||
char gd_ktr_buf_data[KTR_SIZE];
|
||||
#endif
|
||||
};
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*-
|
||||
* Copyright (c) 2001 Jake Burkholder.
|
||||
* Copyright (c) 1999 Luoqi Chen <luoqi@freebsd.org>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -29,23 +29,38 @@
|
||||
#ifndef _MACHINE_GLOBALDATA_H_
|
||||
#define _MACHINE_GLOBALDATA_H_
|
||||
|
||||
struct lock_list_entry;
|
||||
struct pcb;
|
||||
struct proc;
|
||||
#ifdef _KERNEL
|
||||
|
||||
struct globaldata {
|
||||
SLIST_ENTRY(globaldata) gd_allcpu;
|
||||
struct pcb *gd_curpcb;
|
||||
struct proc *gd_curproc;
|
||||
struct proc *gd_idleproc;
|
||||
u_int gd_cpuid;
|
||||
u_int gd_other_cpus;
|
||||
struct lock_list_entry *gd_spinlocks;
|
||||
struct timeval gd_switchtime;
|
||||
#include <sys/queue.h>
|
||||
|
||||
/*
|
||||
* 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
|
||||
* code, which also provides external symbols so that C can get at them as
|
||||
* though they were really globals. This structure is pointed to by
|
||||
* the per-cpu system value.
|
||||
* Inside the kernel, the globally reserved register g7 is used to
|
||||
* point at the globaldata structure.
|
||||
*/
|
||||
struct globaldata {
|
||||
struct proc *gd_curproc; /* current process */
|
||||
struct proc *gd_idleproc; /* idle process */
|
||||
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 */
|
||||
SLIST_ENTRY(globaldata) gd_allcpu;
|
||||
struct lock_list_entry *gd_spinlocks;
|
||||
#ifdef KTR_PERCPU
|
||||
volatile int gd_ktr_idx; /* Index into trace table */
|
||||
char *gd_ktr_buf;
|
||||
char gd_ktr_buf_data[0];
|
||||
#endif
|
||||
struct intr_queue *gd_iq;
|
||||
struct intr_vector *gd_ivt;
|
||||
};
|
||||
|
||||
#endif /* !_MACHINE_GLOBALDATA_H_ */
|
||||
#endif /* _KERNEL */
|
||||
|
||||
#endif /* !_MACHINE_GLOBALDATA_H_ */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*-
|
||||
* Copyright (c) 2001 Jake Burkholder.
|
||||
* Copyright (c) 1999 Luoqi Chen <luoqi@freebsd.org>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -29,23 +29,38 @@
|
||||
#ifndef _MACHINE_GLOBALDATA_H_
|
||||
#define _MACHINE_GLOBALDATA_H_
|
||||
|
||||
struct lock_list_entry;
|
||||
struct pcb;
|
||||
struct proc;
|
||||
#ifdef _KERNEL
|
||||
|
||||
struct globaldata {
|
||||
SLIST_ENTRY(globaldata) gd_allcpu;
|
||||
struct pcb *gd_curpcb;
|
||||
struct proc *gd_curproc;
|
||||
struct proc *gd_idleproc;
|
||||
u_int gd_cpuid;
|
||||
u_int gd_other_cpus;
|
||||
struct lock_list_entry *gd_spinlocks;
|
||||
struct timeval gd_switchtime;
|
||||
#include <sys/queue.h>
|
||||
|
||||
/*
|
||||
* 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
|
||||
* code, which also provides external symbols so that C can get at them as
|
||||
* though they were really globals. This structure is pointed to by
|
||||
* the per-cpu system value.
|
||||
* Inside the kernel, the globally reserved register g7 is used to
|
||||
* point at the globaldata structure.
|
||||
*/
|
||||
struct globaldata {
|
||||
struct proc *gd_curproc; /* current process */
|
||||
struct proc *gd_idleproc; /* idle process */
|
||||
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 */
|
||||
SLIST_ENTRY(globaldata) gd_allcpu;
|
||||
struct lock_list_entry *gd_spinlocks;
|
||||
#ifdef KTR_PERCPU
|
||||
volatile int gd_ktr_idx; /* Index into trace table */
|
||||
char *gd_ktr_buf;
|
||||
char gd_ktr_buf_data[0];
|
||||
#endif
|
||||
struct intr_queue *gd_iq;
|
||||
struct intr_vector *gd_ivt;
|
||||
};
|
||||
|
||||
#endif /* !_MACHINE_GLOBALDATA_H_ */
|
||||
#endif /* _KERNEL */
|
||||
|
||||
#endif /* !_MACHINE_GLOBALDATA_H_ */
|
||||
|
Loading…
Reference in New Issue
Block a user