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