File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -178,12 +178,12 @@ else if ( ret == 0 )
178178else
179179{
180180 // If we detect the event, zero it out so we can reuse the structure
181- if ( pfd [0].revents & POLLIN )
182- pfd [0].revents = 0;
181+ if ( fds [0].revents & POLLIN )
182+ fds [0].revents = 0;
183183 // input event on sock1
184184
185- if ( pfd [1].revents & POLLOUT )
186- pfd [1].revents = 0;
185+ if ( fds [1].revents & POLLOUT )
186+ fds [1].revents = 0;
187187 // output event on sock2
188188}
189189```
Original file line number Diff line number Diff line change @@ -613,7 +613,7 @@ void philosopher(int i) {
613613 think();
614614 take_two(i);
615615 eat();
616- put_tow (i);
616+ put_two (i);
617617 }
618618}
619619
@@ -625,7 +625,7 @@ void take_two(int i) {
625625 down(&s[i]);
626626}
627627
628- void put_tow (i) {
628+ void put_two (i) {
629629 down(&mutex);
630630 state[i] = THINKING;
631631 test(LEFT);
You can’t perform that action at this time.
0 commit comments