|
|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 5120 (0x1400)
Types: Ada Source
Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Network, seg_00fec5
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦5a81ac88f⟧ »Space Info Vol 1«
└─⟦this⟧
with Client;
with Log_Writer;
with Queue_Generic;
package body Network is
package Packet_Queue is new Queue_Generic (Message.Packet);
task Buffer_Pool_Manager is
entry Free (Pkt : Message.Packet);
entry Allocate (Pkt : out Message.Packet);
end Buffer_Pool_Manager;
task Net_Queue is
entry Add (Pkt : Message.Packet);
entry Get (Pkt : in out Message.Packet);
end Net_Queue;
procedure Send (Pkt : Message.Packet) is
Pkt_Copy : Message.Packet;
begin
Buffer_Pool_Manager.Allocate (Pkt_Copy);
Message.Copy (Pkt, Pkt_Copy);
Net_Queue.Add (Pkt_Copy);
end Send;
procedure Receive (Pkt : in out Message.Packet) is
Internal_Pkt : Message.Packet;
begin
Net_Queue.Get (Internal_Pkt);
Message.Copy (Internal_Pkt, Pkt);
Buffer_Pool_Manager.Free (Internal_Pkt);
end Receive;
task body Buffer_Pool_Manager is
Buffer_Queue : Packet_Queue.Queue;
begin
Packet_Queue.Initialize (Buffer_Queue);
loop
begin
select
accept Allocate (Pkt : out Message.Packet) do
if Packet_Queue.Is_Empty (Buffer_Queue) then
declare
The_Packet : Message.Packet;
begin
Message.Initialize (The_Packet, Client.Nil);
Pkt := The_Packet;
end;
else
Pkt := Packet_Queue.First (Buffer_Queue);
Packet_Queue.Delete (Buffer_Queue);
end if;
end Allocate;
or
accept Free (Pkt : Message.Packet) do
Packet_Queue.Add (Buffer_Queue, Pkt);
end Free;
end select;
exception
when others =>
Log_Writer.Log_Message
("Network.Buffer_Pool_Manager", "exception!");
delay 5.0;
end;
end loop;
end Buffer_Pool_Manager;
procedure Test_Connections is
begin
[statement]
end Test_Connections;
procedure Initialize is
begin
null;
end Initialize;
procedure Boot (Remote_Node : Node_Id; Program : Program_Id) is
begin
[statement]
end Boot;
procedure Reset (Remote_Node : Node_Id) is
begin
[statement]
end Reset;
procedure Enter_Test_Mode is
begin
[statement]
end Enter_Test_Mode;
procedure Exit_Test_Mode is
begin
[statement]
end Exit_Test_Mode;
task body Net_Queue is
Q : Packet_Queue.Queue;
begin
Packet_Queue.Initialize (Q);
loop
begin
select
accept Add (Pkt : Message.Packet) do
Packet_Queue.Add (Q, Pkt);
end Add;
or
when not Packet_Queue.Is_Empty (Q) =>
accept Get (Pkt : in out Message.Packet) do
Pkt := Packet_Queue.First (Q);
Packet_Queue.Delete (Q);
end Get;
end select;
end;
end loop;
end Net_Queue;
end Network;
nblk1=4
nid=0
hdr6=8
[0x00] rec0=25 rec1=00 rec2=01 rec3=048
[0x01] rec0=18 rec1=00 rec2=02 rec3=028
[0x02] rec0=30 rec1=00 rec2=03 rec3=036
[0x03] rec0=17 rec1=00 rec2=04 rec3=001
tail 0x2150bb8f0822f63ec798b 0x42a00088462060003