GearsOSにおける
|
Matayoshi Yuto, Shinji Kono
琉球大学
|
__code mkdir(struct GearsDirectoryImpl* gearsDirectory, struct Integer* name, __code next(...)) {
struct FTree* newDirectory = createFileSystemTree(context, gearsDirectory->currentDirectory);
Node* inode = new Node();
inode->key = gearsDirectory->INodeNumber;
inode->value = newDirectory;
struct FTree* cDirectory = new FTree();
cDirectory = gearsDirectory->iNodeTree;
goto cDirectory->put(inode, mkdir2);
}
__code mkdir2(struct GearsDirectoryImpl* gearsDirectory, struct Integer* name, __code next(...)) {
Node* dir = new Node();
dir->key = name->value;
Integer* iNum = new Integer();
iNum->value = gearsDirectory->INodeNumber;
dir->value = iNum;
gearsDirectory->INodeNumber = gearsDirectory->INodeNumber + 1;
struct FTree* cDirectory = new FTree();
cDirectory = gearsDirectory->currentDirectory;
goto cDirectory->put(dir, next(...));
}