🌈 style:

This commit is contained in:
lzy
2024-05-26 15:39:14 +08:00
parent 6f28a3384a
commit a57bbdb4c1
156 changed files with 765 additions and 770 deletions

View File

@@ -27,7 +27,7 @@ static void alrm_handler(int s)
* @param argv
* @return int
***********************************************************************/
int main(int argc, char **argv)
int main(int argc, char** argv)
{
int sfd, dfd = 1;
char buf[BUFSIZE];
@@ -59,9 +59,9 @@ int main(int argc, char **argv)
while (1)
{
while (token <= 0)
pause(); //!
pause( ); //!
token--; //!!! 这条指令不一定原子
token--; //!!! 这条指令不一定原子
//* 阻塞在这里的时候token会自增
while ((len = read(sfd, buf, BUFSIZE)) < 0)