From 21a5071e8492e9030a3358db36d4455774c2c340 Mon Sep 17 00:00:00 2001 From: linkwk7 Date: Fri, 16 Nov 2018 19:26:06 +0800 Subject: [PATCH] Minor fix --- notes/Socket.md | 8 ++++---- notes/计算机操作系统.md | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/notes/Socket.md b/notes/Socket.md index c188580d..3310fda0 100644 --- a/notes/Socket.md +++ b/notes/Socket.md @@ -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 } ``` diff --git a/notes/计算机操作系统.md b/notes/计算机操作系统.md index 8ae04fd2..fbc26212 100644 --- a/notes/计算机操作系统.md +++ b/notes/计算机操作系统.md @@ -613,7 +613,7 @@ void philosopher(int i) { think(); take_two(i); eat(); - put_tow(i); + put_two(i); } } @@ -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);