Commit c1b6edcd authored by Julien's avatar Julien
Browse files

Add files to avoid conflicts with deos

parent 0229a69d
...@@ -136,6 +136,7 @@ package body Ocarina.Backends.POK_C.Main is ...@@ -136,6 +136,7 @@ package body Ocarina.Backends.POK_C.Main is
N : Node_Id; N : Node_Id;
S : constant Node_Id := Parent_Subcomponent (E); S : constant Node_Id := Parent_Subcomponent (E);
Member_Value : Node_Id; Member_Value : Node_Id;
Stack_Size : Unsigned_Long_Long;
begin begin
-- Initializes thread attributes. -- Initializes thread attributes.
if Use_ARINC653_API = False then if Use_ARINC653_API = False then
...@@ -259,7 +260,18 @@ package body Ocarina.Backends.POK_C.Main is ...@@ -259,7 +260,18 @@ package body Ocarina.Backends.POK_C.Main is
Display_Error ("Period not specified", Fatal => True); Display_Error ("Period not specified", Fatal => True);
end if; end if;
--
-- Set up the Stack Size
-- On most system, the default is 4096. So, we set
-- up 4096 if not explicitly declared. We use
-- The AADL property Stack_Size if declared.
--
Stack_Size := 4096;
if Get_Thread_Stack_Size (E) /= Null_Size then if Get_Thread_Stack_Size (E) /= Null_Size then
Stack_Size := To_Bytes (Get_Thread_Stack_Size (E));
end if;
N := N :=
Make_Expression Make_Expression
(Left_Expr => (Left_Expr =>
...@@ -269,13 +281,10 @@ package body Ocarina.Backends.POK_C.Main is ...@@ -269,13 +281,10 @@ package body Ocarina.Backends.POK_C.Main is
Operator => Op_Equal, Operator => Op_Equal,
Right_Expr => Right_Expr =>
Make_Literal Make_Literal
(New_Int_Value (New_Int_Value (Stack_Size,
(To_Bytes (Get_Thread_Stack_Size (E)),
1, 1,
10))); 10)));
Append_Node_To_List (N, Statements); Append_Node_To_List (N, Statements);
end if;
declare declare
TA : constant Time_Array := Get_Execution_Time (E); TA : constant Time_Array := Get_Execution_Time (E);
...@@ -301,10 +310,8 @@ package body Ocarina.Backends.POK_C.Main is ...@@ -301,10 +310,8 @@ package body Ocarina.Backends.POK_C.Main is
-- By default, we allocate 1 ms for thread execution. -- By default, we allocate 1 ms for thread execution.
Capacity := Capacity :=
CTU.Make_Literal (CV.New_Int_Value (Thread_Id, 1, 10)); CTU.Make_Literal (CV.New_Int_Value (Thread_Id, 1, 10));
-- DeOS works with Nanoseconds
end if; end if;
N := N :=
Make_Expression Make_Expression
(Left_Expr => (Left_Expr =>
......
...@@ -133,6 +133,8 @@ package body Ocarina.Backends.POK_C.Runtime is ...@@ -133,6 +133,8 @@ package body Ocarina.Backends.POK_C.Runtime is
for E in ARF_Id loop for E in ARF_Id loop
RE_Header_Table (E) := RH_Apex; RE_Header_Table (E) := RH_Apex;
RE_Header_Table (RE_Null) := RH_Apex;
RE_Header_Table (RE_Normal) := RH_Apex;
end loop; end loop;
for E in ART_Id loop for E in ART_Id loop
......
...@@ -634,9 +634,10 @@ package Ocarina.Backends.POK_C.Runtime is ...@@ -634,9 +634,10 @@ package Ocarina.Backends.POK_C.Runtime is
-- Runtime types associations -- Runtime types associations
RE_Task_Id => RH_Deployment, RE_Task_Id => RH_Deployment,
RE_Error_Status_Type => RH_Error, RE_Error_Status_Type => RH_Error,
RE_Process_Attribute_Type => RH_Types,
RE_Apex_Char => RH_Types, RE_Apex_Char => RH_Types,
RE_Process_Attribute_Type => RH_Types,
RE_Process_Id_Type => RH_Types, RE_Process_Id_Type => RH_Types,
RE_Sampling_Port_Id_Type => RH_Types, RE_Sampling_Port_Id_Type => RH_Types,
RE_Semaphore_Id_Type => RH_Semaphore, RE_Semaphore_Id_Type => RH_Semaphore,
...@@ -649,6 +650,7 @@ package Ocarina.Backends.POK_C.Runtime is ...@@ -649,6 +650,7 @@ package Ocarina.Backends.POK_C.Runtime is
RE_Apex_Integer => RH_Types, RE_Apex_Integer => RH_Types,
RE_Apex_Natural => RH_Types, RE_Apex_Natural => RH_Types,
RE_Return_Code_Type => RH_Types, RE_Return_Code_Type => RH_Types,
RE_Pok_Ret_T => RH_Types, RE_Pok_Ret_T => RH_Types,
RE_Size_T => RH_Types, RE_Size_T => RH_Types,
RE_Uint8_T => RH_Types, RE_Uint8_T => RH_Types,
......
...@@ -128,7 +128,9 @@ package body Ocarina.Backends.POK_C is ...@@ -128,7 +128,9 @@ package body Ocarina.Backends.POK_C is
C_Tree.Generator.Generate (C_Root); C_Tree.Generator.Generate (C_Root);
end if; end if;
if POK_Flavor /= DEOS then
Makefile.Visit (Instance_Root); Makefile.Visit (Instance_Root);
end if;
-- If the user requested to build the applications then build it -- If the user requested to build the applications then build it
......
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