Home | History | Annotate | Line # | Download | only in include
cpu.h revision 1.8
      1  1.8   thorpej /*	$NetBSD: cpu.h,v 1.8 2000/05/26 21:20:02 thorpej Exp $	*/
      2  1.3  nisimura 
      3  1.4    tsubai #ifndef _MACHINE_CPU_H_
      4  1.4    tsubai #define _MACHINE_CPU_H_
      5  1.1    tsubai 
      6  1.1    tsubai #include <mips/cpu.h>
      7  1.3  nisimura #include <mips/cpuregs.h>
      8  1.3  nisimura 
      9  1.4    tsubai #ifndef _LOCORE
     10  1.8   thorpej #if defined(_KERNEL) && !defined(_LKM)
     11  1.8   thorpej #include "opt_lockdebug.h"
     12  1.8   thorpej #endif
     13  1.8   thorpej 
     14  1.4    tsubai extern int systype;
     15  1.4    tsubai 
     16  1.4    tsubai #define NEWS3400	1
     17  1.4    tsubai #define NEWS5000	2
     18  1.8   thorpej 
     19  1.8   thorpej #include <sys/sched.h>
     20  1.8   thorpej struct cpu_info {
     21  1.8   thorpej 	struct schedstate_percpu ci_schedstate; /* scheduler state */
     22  1.8   thorpej #if defined(DIAGNOSTIC) || defined(LOCKDEBUG)
     23  1.8   thorpej 	u_long ci_spin_locks;		/* # of spin locks held */
     24  1.8   thorpej 	u_long ci_simple_locks;		/* # of simple locks held */
     25  1.8   thorpej #endif
     26  1.8   thorpej };
     27  1.8   thorpej 
     28  1.8   thorpej #ifdef _KERNEL
     29  1.8   thorpej extern struct cpu_info cpu_info_store;
     30  1.8   thorpej 
     31  1.8   thorpej #define	curcpu()		(&cpu_info_store)
     32  1.8   thorpej #endif /* _KERNEL */
     33  1.4    tsubai 
     34  1.4    tsubai #endif /* _LOCORE */
     35  1.4    tsubai #endif /* _MACHINE_CPU_H_ */
     36