提交 38f41095 创建 作者: Frans Kaashoek's avatar Frans Kaashoek

remove contabs and contab

上级 46a37cb9
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
struct ptable ptables[NCPU]; struct ptable ptables[NCPU];
struct runq runqs[NCPU]; struct runq runqs[NCPU];
struct condtab condtabs[NCPU];
static struct proc *initproc; static struct proc *initproc;
int nextpid = 1; int nextpid = 1;
...@@ -37,14 +36,6 @@ pinit(void) ...@@ -37,14 +36,6 @@ pinit(void)
runqs[c].name[0] = (char) (c + '0'); runqs[c].name[0] = (char) (c + '0');
safestrcpy(runqs[c].name+1, "runq", MAXNAME-1); safestrcpy(runqs[c].name+1, "runq", MAXNAME-1);
initlock(&runqs[c].lock, runqs[c].name); initlock(&runqs[c].lock, runqs[c].name);
condtabs[c].name[0] = (char) (c + '0');
safestrcpy(condtabs[c].name+1, "condtab", MAXNAME-1);
initlock(&condtabs[c].lock, condtabs[c].name);
for (i = 0; i < NPROC; i++) {
initlock(&condtabs[c].condtab[i].lock, condtabs[c].condtab[i].name);
}
} }
} }
......
...@@ -73,7 +73,6 @@ struct cpu { ...@@ -73,7 +73,6 @@ struct cpu {
struct ptable *ptable; // The per-core proc table struct ptable *ptable; // The per-core proc table
struct kmem *kmem; // The per-core proc table struct kmem *kmem; // The per-core proc table
struct runq *runq; // The per-core proc table struct runq *runq; // The per-core proc table
struct condtab *contab; // The per-core proc table
}; };
...@@ -115,4 +114,3 @@ extern struct proc *proc asm("%gs:4"); // cpus[cpunum()].proc ...@@ -115,4 +114,3 @@ extern struct proc *proc asm("%gs:4"); // cpus[cpunum()].proc
extern struct ptable *ptable asm("%gs:8"); // &ptables[cpunum()] extern struct ptable *ptable asm("%gs:8"); // &ptables[cpunum()]
extern struct kmem *kmem asm("%gs:12"); // &kmems[cpunum()] extern struct kmem *kmem asm("%gs:12"); // &kmems[cpunum()]
extern struct runq *runq asm("%gs:16"); // &runqs[cpunum()] extern struct runq *runq asm("%gs:16"); // &runqs[cpunum()]
extern struct condtab *condtab asm("%gs:20"); // &condtabs[cpunum()]
...@@ -50,7 +50,6 @@ seginit(void) ...@@ -50,7 +50,6 @@ seginit(void)
ptable = &ptables[cpunum()]; ptable = &ptables[cpunum()];
kmem = &kmems[cpunum()]; kmem = &kmems[cpunum()];
runq = &runqs[cpunum()]; runq = &runqs[cpunum()];
condtab = &condtabs[cpunum()];
} }
// Return the address of the PTE in page table pgdir // Return the address of the PTE in page table pgdir
......
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论