Skip to content
New issue

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

lab6中 exercise 6.3 笔误 #8

Open
Jueast opened this issue Jul 2, 2016 · 2 comments
Open

lab6中 exercise 6.3 笔误 #8

Jueast opened this issue Jul 2, 2016 · 2 comments

Comments

@Jueast
Copy link
Collaborator

Jueast commented Jul 2, 2016

Exercise 6.3 修改 user/pipe.c 中的 pipeclose 与 user/fd.c 中的 dup 函数以避免上
述情景中的进程竞争情况。

其中 user/pipe.c 中的 pipeclose 实际上为一条语句的函数,无所谓的顺序问题,应改为user/fd.c 中的 close函数

@Jueast
Copy link
Collaborator Author

Jueast commented Jul 2, 2016

然后调整方法的话,由于close函数不仅仅针对pipe类的文件标示符,其他devfile类文件标识符正常工作仍需先使用dev函数表中的close函数再调用fd的close函数,我在此的修改是特殊处理了pipe类的文件标识符,实践证明可以正常工作。

如果需要修改pipe类中的close函数达到该效果,即修改 pipeclose则会有两次unmap,与调整顺序的语义有所偏差可能会造成误导。

@SivilTaram
Copy link
Owner

So is the issue solved?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants