tasks a-s
This commit is contained in:
parent
47bf37c096
commit
b83f433714
12433 changed files with 156208 additions and 123 deletions
30
Task/Queue-Definition/Ada/queue-definition-11.ada
Normal file
30
Task/Queue-Definition/Ada/queue-definition-11.ada
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
package body Asynchronous_Fifo is
|
||||
|
||||
----------
|
||||
-- Fifo --
|
||||
----------
|
||||
|
||||
protected body Fifo is
|
||||
|
||||
----------
|
||||
-- Push --
|
||||
----------
|
||||
|
||||
procedure Push (Item : Element_Type) is
|
||||
begin
|
||||
Value := Item;
|
||||
Valid := True;
|
||||
end Push;
|
||||
|
||||
---------
|
||||
-- Pop --
|
||||
---------
|
||||
|
||||
entry Pop (Item : out Element_Type) when Valid is
|
||||
begin
|
||||
Item := Value;
|
||||
end Pop;
|
||||
|
||||
end Fifo;
|
||||
|
||||
end Asynchronous_Fifo;
|
||||
Loading…
Add table
Add a link
Reference in a new issue