diff options
author | obrien <obrien@FreeBSD.org> | 2001-08-16 09:29:35 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 2001-08-16 09:29:35 +0000 |
commit | 358f773cec56d6c2efccc594d09099db6ac1665e (patch) | |
tree | fa94197a35ffa007a11c5f91059188205d6476e5 /sys/sparc64/include/globaldata.h | |
parent | 6bf1068b6ed1b605de9e06f71dd10f0d8398e421 (diff) | |
download | FreeBSD-src-358f773cec56d6c2efccc594d09099db6ac1665e.zip FreeBSD-src-358f773cec56d6c2efccc594d09099db6ac1665e.tar.gz |
style(9) and make consistent across platforms
Diffstat (limited to 'sys/sparc64/include/globaldata.h')
-rw-r--r-- | sys/sparc64/include/globaldata.h | 43 |
1 files changed, 29 insertions, 14 deletions
diff --git a/sys/sparc64/include/globaldata.h b/sys/sparc64/include/globaldata.h index b3441dd..35d924b 100644 --- a/sys/sparc64/include/globaldata.h +++ b/sys/sparc64/include/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 { +#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 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; - int gd_switchticks; - +#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_ */ |