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