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