mirror of
https://github.com/CyC2018/CS-Notes.git
synced 2026-03-13 09:50:42 +08:00
auto commit
This commit is contained in:
@@ -270,7 +270,7 @@ down 和 up 操作需要被设计成原语,不可分割,通常的做法是
|
||||
|
||||
```c
|
||||
typedef int semaphore ;
|
||||
samaphore mutex = 1;
|
||||
semaphore mutex = 1;
|
||||
void P1() {
|
||||
down(mutex);
|
||||
// 临界区
|
||||
|
||||
Reference in New Issue
Block a user