Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
Ocarina
Commits
c1b6edcd
Commit
c1b6edcd
authored
Dec 08, 2014
by
Julien
Browse files
Add files to avoid conflicts with deos
parent
0229a69d
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/backends/ocarina-backends-pok_c-main.adb
View file @
c1b6edcd
...
...
@@ -136,6 +136,7 @@ package body Ocarina.Backends.POK_C.Main is
N
:
Node_Id
;
S
:
constant
Node_Id
:=
Parent_Subcomponent
(
E
);
Member_Value
:
Node_Id
;
Stack_Size
:
Unsigned_Long_Long
;
begin
-- Initializes thread attributes.
if
Use_ARINC653_API
=
False
then
...
...
@@ -259,23 +260,31 @@ package body Ocarina.Backends.POK_C.Main is
Display_Error
(
"Period not specified"
,
Fatal
=>
True
);
end
if
;
if
Get_Thread_Stack_Size
(
E
)
/=
Null_Size
then
N
:=
Make_Expression
(
Left_Expr
=>
Make_Member_Designator
(
RE
(
RE_Stack_Size
),
Copy_Node
(
Tattr
)),
Operator
=>
Op_Equal
,
Right_Expr
=>
Make_Literal
(
New_Int_Value
(
To_Bytes
(
Get_Thread_Stack_Size
(
E
)),
1
,
10
)));
--
-- 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.
--
Append_Node_To_List
(
N
,
Statements
);
Stack_Size
:=
4096
;
if
Get_Thread_Stack_Size
(
E
)
/=
Null_Size
then
Stack_Size
:=
To_Bytes
(
Get_Thread_Stack_Size
(
E
));
end
if
;
N
:=
Make_Expression
(
Left_Expr
=>
Make_Member_Designator
(
RE
(
RE_Stack_Size
),
Copy_Node
(
Tattr
)),
Operator
=>
Op_Equal
,
Right_Expr
=>
Make_Literal
(
New_Int_Value
(
Stack_Size
,
1
,
10
)));
Append_Node_To_List
(
N
,
Statements
);
declare
TA
:
constant
Time_Array
:=
Get_Execution_Time
(
E
);
...
...
@@ -301,10 +310,8 @@ package body Ocarina.Backends.POK_C.Main is
-- By default, we allocate 1 ms for thread execution.
Capacity
:=
CTU
.
Make_Literal
(
CV
.
New_Int_Value
(
Thread_Id
,
1
,
10
));
-- DeOS works with Nanoseconds
end
if
;
N
:=
Make_Expression
(
Left_Expr
=>
...
...
src/backends/ocarina-backends-pok_c-runtime.adb
View file @
c1b6edcd
...
...
@@ -133,6 +133,8 @@ package body Ocarina.Backends.POK_C.Runtime is
for
E
in
ARF_Id
loop
RE_Header_Table
(
E
)
:=
RH_Apex
;
RE_Header_Table
(
RE_Null
)
:=
RH_Apex
;
RE_Header_Table
(
RE_Normal
)
:=
RH_Apex
;
end
loop
;
for
E
in
ART_Id
loop
...
...
src/backends/ocarina-backends-pok_c-runtime.ads
View file @
c1b6edcd
...
...
@@ -634,9 +634,10 @@ package Ocarina.Backends.POK_C.Runtime is
-- Runtime types associations
RE_Task_Id
=>
RH_Deployment
,
RE_Error_Status_Type
=>
RH_Error
,
RE_Process_Attribute_Type
=>
RH_Types
,
RE_Apex_Char
=>
RH_Types
,
RE_Process_Attribute_Type
=>
RH_Types
,
RE_Process_Id_Type
=>
RH_Types
,
RE_Sampling_Port_Id_Type
=>
RH_Types
,
RE_Semaphore_Id_Type
=>
RH_Semaphore
,
...
...
@@ -649,6 +650,7 @@ package Ocarina.Backends.POK_C.Runtime is
RE_Apex_Integer
=>
RH_Types
,
RE_Apex_Natural
=>
RH_Types
,
RE_Return_Code_Type
=>
RH_Types
,
RE_Pok_Ret_T
=>
RH_Types
,
RE_Size_T
=>
RH_Types
,
RE_Uint8_T
=>
RH_Types
,
...
...
src/backends/ocarina-backends-pok_c.adb
View file @
c1b6edcd
...
...
@@ -128,7 +128,9 @@ package body Ocarina.Backends.POK_C is
C_Tree
.
Generator
.
Generate
(
C_Root
);
end
if
;
Makefile
.
Visit
(
Instance_Root
);
if
POK_Flavor
/=
DEOS
then
Makefile
.
Visit
(
Instance_Root
);
end
if
;
-- If the user requested to build the applications then build it
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment