22 lines
567 B
C
22 lines
567 B
C
#include <config.h>
|
|
#include <lib/spinlock.h>
|
|
#include <riscv.h>
|
|
#include <types.h>
|
|
|
|
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 {};
|