diff --git a/notes/计算机操作系统.md b/notes/计算机操作系统.md index 6f4bae92..f302ab2a 100644 --- a/notes/计算机操作系统.md +++ b/notes/计算机操作系统.md @@ -535,9 +535,8 @@ void put_tow(i) { up(&mutex); } -void test(i) { // 尝试拿起两把筷子 - if(state[i] == HUNGRY && state[LEFT] != EATING - && state[RIGHT] !=EATING) { +void test(i) { // 尝试拿起两把筷子 + if(state[i] == HUNGRY && state[LEFT] != EATING && state[RIGHT] !=EATING) { state[i] = EATING; up(&s[i]); }