auto commit
This commit is contained in:
parent
df928c793d
commit
2ee324eec1
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue
Block a user