diff --git a/notes/计算机操作系统.md b/notes/计算机操作系统.md index 89958614..18074fee 100644 --- a/notes/计算机操作系统.md +++ b/notes/计算机操作系统.md @@ -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);