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