auto commit
This commit is contained in:
parent
948b8b8a59
commit
da302df443
@ -270,7 +270,7 @@ down 和 up 操作需要被设计成原语,不可分割,通常的做法是
|
||||
|
||||
```c
|
||||
typedef int semaphore ;
|
||||
samaphore mutex = 1;
|
||||
semaphore mutex = 1;
|
||||
void P1() {
|
||||
down(mutex);
|
||||
// 临界区
|
||||
|
Loading…
x
Reference in New Issue
Block a user