X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Ftests%2Ffilesys%2Fextended%2Fchild-syn-rw.c;h=434a542e25a58cf4491aafb1b2bcc1c72ec10b5d;hb=fe001d5a77600d3e5668190578e810ec41eb1e22;hp=6334bda0b1077d97707df098c44a9f30b87d277c;hpb=4ebf33908a571a7cde93fe618902b044e3633cdf;p=pintos-anon diff --git a/src/tests/filesys/extended/child-syn-rw.c b/src/tests/filesys/extended/child-syn-rw.c index 6334bda..434a542 100644 --- a/src/tests/filesys/extended/child-syn-rw.c +++ b/src/tests/filesys/extended/child-syn-rw.c @@ -1,3 +1,12 @@ +/* Child process for syn-rw. + Reads from a file created by our parent process, which is + growing it. We loop until we've read the whole file + successfully. Many iterations through the loop will return 0 + bytes, because the file has not grown in the meantime. That + is, we are "busy waiting" for the file to grow. + (This test could be improved by adding a "yield" system call + and calling yield whenever we receive a 0-byte read.) */ + #include #include #include