Commit 611e0a03 authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Prepare thread creation

parent 932b4596
...@@ -273,18 +273,13 @@ package body TASTE.AADL_Parser is ...@@ -273,18 +273,13 @@ package body TASTE.AADL_Parser is
Model.Deployment_View.Find_Node Model.Deployment_View.Find_Node
(To_String (Remote.Function_Name)); (To_String (Remote.Function_Name));
begin begin
if not Remote_Node.Has_Value then if not Remote_Node.Has_Value
raise Concurrency_View_Error with or not Block.Node.Has_Value
"Calling function " then
& To_String (Remote.Function_Name)
& ": could not find binding (parser bug?)";
end if;
if not Block.Node.Has_Value then
raise Concurrency_View_Error with raise Concurrency_View_Error with
"Function " "Concurrency Generation Error (parser bug?)";
& To_String (F.Name)
& ": cound not find binding (parser bug?)";
end if; end if;
if Block.Node.Unsafe_Just /= Remote_Node.Unsafe_Just if Block.Node.Unsafe_Just /= Remote_Node.Unsafe_Just
then then
-- At least one caller is on a different node -- At least one caller is on a different node
...@@ -292,10 +287,25 @@ package body TASTE.AADL_Parser is ...@@ -292,10 +287,25 @@ package body TASTE.AADL_Parser is
end if; end if;
end; end;
end loop; end loop;
Block.Provided.Insert (Key => To_String (PI.Name), Block.Provided.Insert (Key => To_String (PI.Name),
New_Item => New_PI); New_Item => New_PI);
end; end;
if PI.RCM = Cyclic_Operation or PI.RCM = Sporadic_Operation then
declare
Thread : AADL_Thread :=
(Name => F.Name & "_" & PI.Name,
Entry_Port_Name => PI.Name,
Protected_Block_name => Block.Name,
Node => Block.Node,
others => <>);
begin
-- Todo: add Thread.Output_Ports
Result.Threads.Include
(Key => To_String (Thread.Name),
New_Item => Thread);
end;
end if;
end loop; end loop;
Block.Required := F.Required; Block.Required := F.Required;
-- Find calling threads and add them to New_Block.Calling_Threads -- Find calling threads and add them to New_Block.Calling_Threads
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment