Data update
This commit is contained in:
parent
5150844a7d
commit
4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions
|
|
@ -1,6 +0,0 @@
|
|||
protected type Mutex is
|
||||
entry Seize;
|
||||
procedure Release;
|
||||
private
|
||||
Owned : Boolean := False;
|
||||
end Mutex;
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
protected body Mutex is
|
||||
entry Seize when not Owned is
|
||||
begin
|
||||
Owned := True;
|
||||
end Seize;
|
||||
procedure Release is
|
||||
begin
|
||||
Owned := False;
|
||||
end Release;
|
||||
end Mutex;
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
declare
|
||||
M : Mutex;
|
||||
begin
|
||||
M.Seize; -- Wait infinitely for the mutex to be free
|
||||
... -- Critical code
|
||||
M.Release; -- Release the mutex
|
||||
...
|
||||
select
|
||||
M.Seize; -- Wait no longer than 0.5s
|
||||
or delay 0.5;
|
||||
raise Timed_Out;
|
||||
end select;
|
||||
... -- Critical code
|
||||
M.Release; -- Release the mutex
|
||||
end;
|
||||
Loading…
Add table
Add a link
Reference in a new issue