auto commit
This commit is contained in:
parent
87e6ed7d38
commit
f4a3c25924
|
@ -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]);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user