Commit 485db820 authored by Jerome Hugues's avatar Jerome Hugues

Merge branch 'master' of https://github.com/OpenAADL/ocarina

parents 3c00296d a37a9efb
......@@ -363,7 +363,8 @@ package body Ocarina.Backends.PO_HI_C.Activity is
Get_Thread_Dispatch_Protocol (E);
Impl_Kind : constant Supported_Thread_Implementation :=
Get_Thread_Implementation_Kind (E);
Call_Parameters : List_Id;
Call_Parameters : List_Id;
Call_Parameters_Of_BA_Initialization_Function : List_Id;
N, N1 : Node_Id;
procedure Make_Wait_Event;
......@@ -1547,6 +1548,8 @@ package body Ocarina.Backends.PO_HI_C.Activity is
Append_Node_To_List (N, Statements);
Call_Parameters := New_List (CTN.K_Parameter_List);
Call_Parameters_Of_BA_Initialization_Function :=
New_List (CTN.K_Parameter_List);
if Current_Device /= No_Node then
N :=
Make_Defining_Identifier
......@@ -1555,8 +1558,12 @@ package body Ocarina.Backends.PO_HI_C.Activity is
Custom_Parent => Current_Device));
else
N := Make_Defining_Identifier (Map_C_Enumerator_Name (S));
N1 := Make_Defining_Identifier (Map_C_Enumerator_Name (S));
end if;
Append_Node_To_List (N, Call_Parameters);
Append_Node_To_List
(N1,
Call_Parameters_Of_BA_Initialization_Function);
N :=
CTU.Make_Call_Profile
(RE (RE_Wait_For_Next_Period),
......@@ -1567,6 +1574,25 @@ package body Ocarina.Backends.PO_HI_C.Activity is
declare
BA : Node_Id;
begin
if not AAU.Is_Empty (Subcomponents (E)) then
N1 := First_Node (Subcomponents (E));
while Present (N1) loop
if AAU.Is_Data (Corresponding_Instance (N1)) then
N :=
Make_Variable_Address
(Map_C_Defining_Identifier (N1));
Append_Node_To_List
(N,
Call_Parameters_Of_BA_Initialization_Function);
end if;
N1 := Next_Node (N1);
end loop;
end if;
BA := Get_Behavior_Specification (E);
if BANu.Length (BATN.States (BA)) > 1 then
......@@ -1588,7 +1614,8 @@ package body Ocarina.Backends.PO_HI_C.Activity is
(Defining_Identifier => Make_Defining_Identifier
(Map_C_BA_Related_Function_Name
(S, BA_Initialization => True)),
Parameters => Call_Parameters);
Parameters =>
Call_Parameters_Of_BA_Initialization_Function);
Append_Node_To_List (N, Statements);
N :=
......
Markdown is supported
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