rCore-Tutorial-Book-v3 icon indicating copy to clipboard operation
rCore-Tutorial-Book-v3 copied to clipboard

rCore-Tutorial-Book-v3/chapter6/1file-descriptor

Open utterances-bot opened this issue 4 years ago • 2 comments

文件与文件描述符 — rCore-Tutorial-Book-v3 0.1 文档

https://rcore-os.github.io/rCore-Tutorial-Book-v3/chapter6/1file-descriptor.html

utterances-bot avatar Mar 22 '21 07:03 utterances-bot

请问一下sys_write和sys_read系统调用里,之所以要手动释放inner的锁,是因为file.read或者file.write里可能会进行run_next或者exit_and_run_next,而导致进程切换是吗?

huang-jl avatar Mar 22 '21 07:03 huang-jl

@huang-jl 是的,可以看 Pipe::read/write

wyfcyx avatar Mar 22 '21 13:03 wyfcyx