Another fix.
This commit is contained in:
parent
64cd81e9b1
commit
5a61d1d0df
@ -69,6 +69,7 @@ male_wrapper(void * unused1, unsigned long unused2) {
|
|||||||
} else {
|
} else {
|
||||||
cv_wait(startcv, startlock);
|
cv_wait(startcv, startlock);
|
||||||
}
|
}
|
||||||
|
lock_release(startlock);
|
||||||
male();
|
male();
|
||||||
V(endsem);
|
V(endsem);
|
||||||
|
|
||||||
@ -99,6 +100,7 @@ female_wrapper(void * unused1, unsigned long unused2) {
|
|||||||
} else {
|
} else {
|
||||||
cv_wait(startcv, startlock);
|
cv_wait(startcv, startlock);
|
||||||
}
|
}
|
||||||
|
lock_release(startlock);
|
||||||
female();
|
female();
|
||||||
V(endsem);
|
V(endsem);
|
||||||
|
|
||||||
@ -129,6 +131,7 @@ matchmaker_wrapper(void * unused1, unsigned long unused2) {
|
|||||||
} else {
|
} else {
|
||||||
cv_wait(startcv, startlock);
|
cv_wait(startcv, startlock);
|
||||||
}
|
}
|
||||||
|
lock_release(startlock);
|
||||||
matchmaker();
|
matchmaker();
|
||||||
V(endsem);
|
V(endsem);
|
||||||
|
|
||||||
@ -209,6 +212,7 @@ turnright_wrapper(void *unused, unsigned long direction)
|
|||||||
} else {
|
} else {
|
||||||
cv_wait(startcv, startlock);
|
cv_wait(startcv, startlock);
|
||||||
}
|
}
|
||||||
|
lock_release(startlock);
|
||||||
turnright((uint32_t)direction);
|
turnright((uint32_t)direction);
|
||||||
V(endsem);
|
V(endsem);
|
||||||
|
|
||||||
@ -228,6 +232,7 @@ gostraight_wrapper(void *unused, unsigned long direction)
|
|||||||
} else {
|
} else {
|
||||||
cv_wait(startcv, startlock);
|
cv_wait(startcv, startlock);
|
||||||
}
|
}
|
||||||
|
lock_release(startlock);
|
||||||
gostraight((uint32_t)direction);
|
gostraight((uint32_t)direction);
|
||||||
V(endsem);
|
V(endsem);
|
||||||
|
|
||||||
@ -247,6 +252,7 @@ turnleft_wrapper(void *unused, unsigned long direction)
|
|||||||
} else {
|
} else {
|
||||||
cv_wait(startcv, startlock);
|
cv_wait(startcv, startlock);
|
||||||
}
|
}
|
||||||
|
lock_release(startlock);
|
||||||
turnleft((uint32_t)direction);
|
turnleft((uint32_t)direction);
|
||||||
V(endsem);
|
V(endsem);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user