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