Skip to content

Commit

Permalink
Merge pull request CyC2018#455 from linkwk7/fix-typo
Browse files Browse the repository at this point in the history
Fix typo
  • Loading branch information
CyC2018 authored Nov 19, 2018
2 parents 1768e57 + 21a5071 commit aead15e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions notes/Socket.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,12 +178,12 @@ else if ( ret == 0 )
else
{
// If we detect the event, zero it out so we can reuse the structure
if ( pfd[0].revents & POLLIN )
pfd[0].revents = 0;
if ( fds[0].revents & POLLIN )
fds[0].revents = 0;
// input event on sock1

if ( pfd[1].revents & POLLOUT )
pfd[1].revents = 0;
if ( fds[1].revents & POLLOUT )
fds[1].revents = 0;
// output event on sock2
}
```
Expand Down
4 changes: 2 additions & 2 deletions notes/计算机操作系统.md
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@ void philosopher(int i) {
think();
take_two(i);
eat();
put_tow(i);
put_two(i);
}
}
Expand All @@ -625,7 +625,7 @@ void take_two(int i) {
down(&s[i]);
}
void put_tow(i) {
void put_two(i) {
down(&mutex);
state[i] = THINKING;
test(LEFT);
Expand Down

0 comments on commit aead15e

Please sign in to comment.