Commit 09c158b3 authored by julien.delange's avatar julien.delange
Browse files

* ocarina/src/backends/ocarina-backends-po_hi_c.adb

 * ocarina/src/backends/ocarina-backends-po_hi_c-runtime.ads
   ocarina/src/backends/ocarina-backends-po_hi_c-main.adb
   - Add the __po_hi_initialize_early function



git-svn-id: https://tecsw.estec.esa.int/svn/taste/trunk/ocarina@2341 129961e7-ef38-4bb5-a8f7-c9a525a55882
parent 70ed0103
...@@ -270,6 +270,28 @@ package body Ocarina.Backends.PO_HI_C.Main is ...@@ -270,6 +270,28 @@ package body Ocarina.Backends.PO_HI_C.Main is
Main_Function := Make_Function_Implementation Main_Function := Make_Function_Implementation
(Spec, Declarations, Statements); (Spec, Declarations, Statements);
N := CTU.Make_Call_Profile (RE (RE_Initialize_Early));
Append_Node_To_List (N, CTN.Statements (Main_Function));
-- Visit all devices attached to the parent system that
-- share the same processor as process E.
-- This is done to initialize all devices before system starts.
if not AAU.Is_Empty (Subcomponents (The_System)) then
C := First_Node (Subcomponents (The_System));
while Present (C) loop
if AAU.Is_Device (Corresponding_Instance (C))
and then
Get_Bound_Processor (Corresponding_Instance (C))
= Get_Bound_Processor (E)
then
Visit_Device_Instance
(Corresponding_Instance (C));
end if;
C := Next_Node (C);
end loop;
end if;
N := CTU.Make_Call_Profile (RE (RE_Initialize)); N := CTU.Make_Call_Profile (RE (RE_Initialize));
Append_Node_To_List (N, CTN.Statements (Main_Function)); Append_Node_To_List (N, CTN.Statements (Main_Function));
...@@ -342,25 +364,6 @@ package body Ocarina.Backends.PO_HI_C.Main is ...@@ -342,25 +364,6 @@ package body Ocarina.Backends.PO_HI_C.Main is
end loop; end loop;
end if; end if;
-- Visit all devices attached to the parent system that
-- share the same processor as process E.
-- This is done to initialize all devices before system starts.
if not AAU.Is_Empty (Subcomponents (The_System)) then
C := First_Node (Subcomponents (The_System));
while Present (C) loop
if AAU.Is_Device (Corresponding_Instance (C))
and then
Get_Bound_Processor (Corresponding_Instance (C))
= Get_Bound_Processor (E)
then
Visit_Device_Instance
(Corresponding_Instance (C));
end if;
C := Next_Node (C);
end loop;
end if;
-- Here, we should automatically initialize the sockets layer -- Here, we should automatically initialize the sockets layer
if not AAU.Is_Empty (Subcomponents (E)) then if not AAU.Is_Empty (Subcomponents (E)) then
...@@ -600,7 +603,7 @@ package body Ocarina.Backends.PO_HI_C.Main is ...@@ -600,7 +603,7 @@ package body Ocarina.Backends.PO_HI_C.Main is
Make_List_Id Make_List_Id
(Make_Defining_Identifier (Make_Defining_Identifier
(Map_C_Enumerator_Name (E)))); (Map_C_Enumerator_Name (E))));
Append_Node_To_List (N, CTN.Declarations (Main_Function)); Append_Node_To_List (N, CTN.Statements (Main_Function));
end if; end if;
if Impl /= No_Node then if Impl /= No_Node then
......
...@@ -70,6 +70,7 @@ package Ocarina.Backends.PO_HI_C.Runtime is ...@@ -70,6 +70,7 @@ package Ocarina.Backends.PO_HI_C.Runtime is
RE_Create_Sporadic_Task, -- __po_hi_create_sporadic_task RE_Create_Sporadic_Task, -- __po_hi_create_sporadic_task
RE_Wait_For_Next_Period, -- __po_hi_task_wait_for_next_period RE_Wait_For_Next_Period, -- __po_hi_task_wait_for_next_period
RE_Initialize, -- __po_hi_initialize RE_Initialize, -- __po_hi_initialize
RE_Initialize_Early, -- __po_hi_initialize_early
RE_Wait_Initialization, -- __po_hi_wait_initialization RE_Wait_Initialization, -- __po_hi_wait_initialization
RE_Marshall_Bool, -- __po_hi_marshall_bool RE_Marshall_Bool, -- __po_hi_marshall_bool
RE_Unmarshall_Bool, -- __po_hi_unmarshall_bool RE_Unmarshall_Bool, -- __po_hi_unmarshall_bool
...@@ -283,6 +284,7 @@ package Ocarina.Backends.PO_HI_C.Runtime is ...@@ -283,6 +284,7 @@ package Ocarina.Backends.PO_HI_C.Runtime is
RE_Wait_For_Next_Period => RH_PO_HI_Task, RE_Wait_For_Next_Period => RH_PO_HI_Task,
RE_Compute_Next_Period => RH_PO_HI_Task, RE_Compute_Next_Period => RH_PO_HI_Task,
RE_Initialize => RH_PO_HI_Main, RE_Initialize => RH_PO_HI_Main,
RE_Initialize_Early => RH_PO_HI_Main,
RE_Wait_Initialization => RH_PO_HI_Main, RE_Wait_Initialization => RH_PO_HI_Main,
RE_Protected_Lock => RH_PO_HI_Protected, RE_Protected_Lock => RH_PO_HI_Protected,
RE_Protected_Unlock => RH_PO_HI_Protected, RE_Protected_Unlock => RH_PO_HI_Protected,
......
...@@ -191,11 +191,6 @@ package body Ocarina.Backends.PO_HI_C is ...@@ -191,11 +191,6 @@ package body Ocarina.Backends.PO_HI_C is
Write_Str ("NEED_TRANSPORT = "); Write_Str ("NEED_TRANSPORT = ");
if Use_Transport then if Use_Transport then
Write_Line ("yes"); Write_Line ("yes");
-- if Transport_API = Transport_BSD_Sockets then
-- Write_Line
-- ("ACTUAL_TRANSPORT= po_hi_sockets.o ");
-- end if;
else else
Write_Line ("no"); Write_Line ("no");
end if; end if;
......
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