Use the nstbl for the inode table

上级 e7b3d140
...@@ -157,12 +157,12 @@ ino_hash(const pair<u32, u32> &p) ...@@ -157,12 +157,12 @@ ino_hash(const pair<u32, u32> &p)
return p.first ^ p.second; return p.first ^ p.second;
} }
static xns<pair<u32, u32>, inode*, ino_hash> *ins; static nstbl<pair<u32, u32>, inode*, ino_hash> *ins;
void void
initinode(void) initinode(void)
{ {
ins = new xns<pair<u32, u32>, inode*, ino_hash>(false); ins = new nstbl<pair<u32, u32>, inode*, ino_hash>();
the_root = inode::alloc(ROOTDEV, ROOTINO); the_root = inode::alloc(ROOTDEV, ROOTINO);
if (ins->insert(make_pair(the_root->dev, the_root->inum), the_root) < 0) if (ins->insert(make_pair(the_root->dev, the_root->inum), the_root) < 0)
panic("initinode: insert the_root failed"); panic("initinode: insert the_root failed");
......
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论