Renames
This commit is contained in:
parent
ea016307cf
commit
ae356930d8
8 changed files with 12 additions and 201 deletions
|
|
@ -1,5 +1,5 @@
|
|||
#pragma once
|
||||
#include <types.h>
|
||||
#include <stdint.h>
|
||||
|
||||
typedef struct {
|
||||
volatile uint32_t v; // 0 = unlocked, 1 = locked
|
||||
|
|
|
|||
11
kern/proc.h
11
kern/proc.h
|
|
@ -1,3 +1,6 @@
|
|||
#include <config.h>
|
||||
#include <spinlock.h>
|
||||
#include <riscv.h>
|
||||
#include <stdint.h>
|
||||
|
||||
typedef enum {
|
||||
|
|
@ -37,6 +40,7 @@ struct Cpu {
|
|||
int intena; // Were interrupts enabled before push_off()?
|
||||
};
|
||||
|
||||
/** Saved registers for kernel context switches. */
|
||||
typedef struct {
|
||||
/* 0 */ uint64_t kernel_satp; // kernel page table
|
||||
/* 8 */ uint64_t kernel_sp; // top of process's kernel stack
|
||||
|
|
@ -75,3 +79,10 @@ typedef struct {
|
|||
/* 272 */ uint64_t t5;
|
||||
/* 280 */ uint64_t t6;
|
||||
} TrapFrame_t;
|
||||
|
||||
struct Cpu *mycpu(void);
|
||||
|
||||
extern struct Cpu cpus[NCPU];
|
||||
|
||||
/** Per-process state */
|
||||
struct Proc {};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue