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