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