vault backup: 2025-04-03 18:26:35

This commit is contained in:
Marco Realacci 2025-04-03 18:26:35 +02:00
parent 05b428be81
commit 1315545918

View file

@ -57,9 +57,11 @@ operation begin_write() :=
CW.signal() # wakes eventually other waiting writers *they will return false*
if (AR + AW != 0) then
CW.wait()
if LASTW
if (LASTW != i) then
return false
AW++
WW--
return true
operation end_write() :=
AW--
@ -68,3 +70,11 @@ operation end_write() :=
else
CR.signal()
```
```
CNT initalized to the value I want to initalize the semaphore
up() :=
if CNT < 0 then
```