vault backup: 2025-04-03 18:32:36

This commit is contained in:
Marco Realacci 2025-04-03 18:32:36 +02:00
parent 1315545918
commit 0a46a6234d

View file

@ -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()
``` ```