提交 163926b3 创建 作者: Austin Clements's avatar Austin Clements

sched, futex: Remove more manual global initializers

上级 b01e8a94
...@@ -269,7 +269,4 @@ initfutex(void) ...@@ -269,7 +269,4 @@ initfutex(void)
nsfutex = new xns<futexkey_t, futexaddr*, futexkey_hash>(false); nsfutex = new xns<futexkey_t, futexaddr*, futexkey_hash>(false);
if (nsfutex == 0) if (nsfutex == 0)
panic("initfutex"); panic("initfutex");
for (int i = 0; i < NCPU; i++)
new (&nscache_[i]) nscache();
} }
...@@ -339,9 +339,6 @@ statread(struct inode *inode, char *dst, u32 off, u32 n) ...@@ -339,9 +339,6 @@ statread(struct inode *inode, char *dst, u32 off, u32 n)
void void
initsched(void) initsched(void)
{ {
for (int i = 0; i < NCPU; i++)
new (&schedule_[i]) schedule();
devsw[MAJ_STAT].write = nullptr; devsw[MAJ_STAT].write = nullptr;
devsw[MAJ_STAT].read = statread; devsw[MAJ_STAT].read = statread;
} }
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论