|
|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 Tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: B T
Length: 1941 (0x795)
Types: TextFile
Names: »B«
└─⟦f64eaa120⟧ Bits:30000752 8mm tape, Rational 1000, !projects 93 02 16
└─⟦6f12a12be⟧ »DATA«
└─⟦this⟧
with Ack_Waiting_Workers;
with Frame;
with Serial_Communication;
with Worker;
with Worker_Group;
package body Worker_Scheduler is
task Scheduler;
procedure Acknowledge;
procedure Dispatch_Message (Receiver : out Worker.Worker_Reference;
M : Frame.Message;
Need_More : out Boolean);
procedure Send_Message (Receiver : Worker.Worker_Reference;
M : Frame.Message;
Need_More : out Boolean);
task body Scheduler is
M : Frame.Message;
Direct_Send : Boolean := False;
Prioritary_Worker : Worker.Worker_Reference;
begin
loop
Serial_Communication.Get (M);
if Direct_Send then
Send_Message (Prioritary_Worker, M, Direct_Send);
elsif Frame.Is_Acknowledge (M) then
Acknowledge;
else
Dispatch_Message (Prioritary_Worker, M, Direct_Send);
end if;
end loop;
end Scheduler;
procedure Acknowledge is
begin
if Ack_Waiting_Workers.Exist then
Worker.Acknowledge (Ack_Waiting_Workers.Extract);
end if;
end Acknowledge;
procedure Dispatch_Message (Receiver : out Worker.Worker_Reference;
M : Frame.Message;
Need_More : out Boolean) is
A_Worker : Worker.Worker_Reference;
begin
A_Worker := Worker_Group.Get_Worker (Frame.As_Address (M));
Worker.Accept_Message (A_Worker, M, Need_More);
Receiver := A_Worker;
end Dispatch_Message;
procedure Send_Message (Receiver : Worker.Worker_Reference;
M : Frame.Message;
Need_More : out Boolean) is
begin
Worker.Accept_Message (Receiver, M, Need_More);
end Send_Message;
end Worker_Scheduler;