auto commit

This commit is contained in:
CyC2018 2018-03-13 11:11:28 +08:00
parent df928c793d
commit 2ee324eec1

View File

@ -310,7 +310,7 @@ semaphore full = 0;
void producer() {
while(TRUE){
int item = produce_item;
int item = produce_item();
down(empty);
down(mutex);
insert_item(item);
@ -323,7 +323,7 @@ void consumer() {
while(TRUE){
down(full);
down(mutex);
int item = remove_item(item);
int item = remove_item();
up(mutex);
up(empty);
consume_item(item);