vault backup: 2025-04-03 18:32:36
This commit is contained in:
parent
1315545918
commit
0a46a6234d
1 changed files with 8 additions and 1 deletions
|
@ -73,8 +73,15 @@ operation end_write() :=
|
||||||
|
|
||||||
```
|
```
|
||||||
CNT initalized to the value I want to initalize the semaphore
|
CNT initalized to the value I want to initalize the semaphore
|
||||||
|
Condition S
|
||||||
|
|
||||||
up() :=
|
up() :=
|
||||||
if CNT < 0 then
|
if CNT < 0 then
|
||||||
|
S.signal()
|
||||||
|
CNT++
|
||||||
|
|
||||||
|
down() :=
|
||||||
|
CNT--
|
||||||
|
if CNT < 0 then
|
||||||
|
S.wait()
|
||||||
```
|
```
|
Loading…
Add table
Add a link
Reference in a new issue