neptune/lib/proc.h

23 lines
592 B
C

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