We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exercise 6.3 修改 user/pipe.c 中的 pipeclose 与 user/fd.c 中的 dup 函数以避免上 述情景中的进程竞争情况。
其中 user/pipe.c 中的 pipeclose 实际上为一条语句的函数,无所谓的顺序问题,应改为user/fd.c 中的 close函数
pipeclose
close
The text was updated successfully, but these errors were encountered:
然后调整方法的话,由于close函数不仅仅针对pipe类的文件标示符,其他devfile类文件标识符正常工作仍需先使用dev函数表中的close函数再调用fd的close函数,我在此的修改是特殊处理了pipe类的文件标识符,实践证明可以正常工作。
如果需要修改pipe类中的close函数达到该效果,即修改 pipeclose则会有两次unmap,与调整顺序的语义有所偏差可能会造成误导。
Sorry, something went wrong.
So is the issue solved?
No branches or pull requests
其中 user/pipe.c 中的
pipeclose
实际上为一条语句的函数,无所谓的顺序问题,应改为user/fd.c 中的close
函数The text was updated successfully, but these errors were encountered: