#include #include #include #include int cpuid(void); struct Cpu *mycpu(void); /** Saved registers for kernel context switches. */ struct Context {}; /** Per-CPU state. */ struct Cpu { struct Proc *proc; // The process running on this cpu, or null. struct Context context; // swtch() here to enter scheduler(). int noff; // Depth of push_off() nesting. int intena; // Were interrupts enabled before push_off()? }; extern struct Cpu cpus[NCPU]; /** Per-process state */ struct Proc {};