struct pte {
bool valid;
bool writable;
unsigned int pfn;
unsigned int private; /* May used to backup something ... */
};
struct pte_directory {
struct pte ptes[NR_PTES_PER_PAGE];
};
struct pagetable {
struct pte_directory *outer_ptes[NR_PTES_PER_PAGE];
};
/**
* Simplified PCB
*/
struct process {
unsigned int pid;
struct pagetable pagetable;
struct list_head list; /* List head to chain processes on the system */
};
--------------------------------------------------------------------------------------------구조체
//처음에 만들어질때
static struct process init = {
.pid = 0,
.list = LIST_HEAD_INIT(init.list),
.pagetable = {
.outer_ptes = { NULL },
},
};
--------------------------------------------------------------------------------------------초기화
current->pagetable.outer_ptes[0]->ptes[0].pfn=10;
이렇게 쓰려고하면 segmentation fault 나오는데 어떻게 써야 써질까요ㅠㅜ
current 가 어딨는데
저거 글로벌로 쓴느낌? 사실 잘몰라요 교수님이 짜준 소스라서 current가 process입니다
나도 몰라 그럼