Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
31
Task/Queue-Definition/Ada/queue-definition-8.ada
Normal file
31
Task/Queue-Definition/Ada/queue-definition-8.ada
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
package body Synchronous_Fifo is
|
||||
|
||||
----------
|
||||
-- Fifo --
|
||||
----------
|
||||
|
||||
protected body Fifo is
|
||||
|
||||
---------
|
||||
-- Push --
|
||||
---------
|
||||
|
||||
entry Push (Item : Element_Type) when not Is_New is
|
||||
begin
|
||||
Value := Item;
|
||||
Is_New := True;
|
||||
end Push;
|
||||
|
||||
---------
|
||||
-- Pop --
|
||||
---------
|
||||
|
||||
entry Pop (Item : out Element_Type) when Is_New is
|
||||
begin
|
||||
Item := Value;
|
||||
Is_New := False;
|
||||
end Pop;
|
||||
|
||||
end Fifo;
|
||||
|
||||
end Synchronous_Fifo;
|
||||
Loading…
Add table
Add a link
Reference in a new issue