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