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
bbc43558
Commit
bbc43558
authored
Nov 18, 2016
by
yoogx
Browse files
* Generate the __PO_HI_TASKS_STACK which is the sum of stack
size of all threads in the system For issue #59
parent
3fa81987
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/backends/ocarina-backends-po_hi_c-deployment.adb
View file @
bbc43558
...
...
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-201
5
ESA & ISAE. --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-201
6
ESA & ISAE. --
-- --
-- Ocarina is free software; you can redistribute it and/or modify under --
-- terms of the GNU General Public License as published by the Free Soft- --
...
...
@@ -182,6 +182,7 @@ package body Ocarina.Backends.PO_HI_C.Deployment is
Local_Port_Identifier
:
Unsigned_Long_Long
:=
0
;
Entity_Identifier
:
Unsigned_Long_Long
:=
0
;
Task_Identifier
:
Unsigned_Long_Long
:=
0
;
Tasks_Stack
:
Unsigned_Long_Long
:=
0
;
Nb_Protected
:
Unsigned_Long_Long
:=
0
;
Device_Id
:
Unsigned_Long_Long
:=
0
;
Bus_Id
:
Unsigned_Long_Long
:=
0
;
...
...
@@ -907,6 +908,7 @@ package body Ocarina.Backends.PO_HI_C.Deployment is
Node_Identifier
:=
0
;
Task_Identifier
:=
0
;
Tasks_Stack
:=
0
;
Nb_Protected
:=
0
;
Nb_Ports_In_Process
:=
0
;
...
...
@@ -1271,6 +1273,12 @@ package body Ocarina.Backends.PO_HI_C.Deployment is
Value
=>
Make_Literal
(
New_Int_Value
(
Task_Identifier
,
1
,
10
)));
Append_Node_To_List
(
N
,
CTN
.
Declarations
(
Current_File
));
N
:=
Make_Define_Statement
(
Defining_Identifier
=>
RE
(
RE_Tasks_Stack
),
Value
=>
Make_Literal
(
New_Int_Value
(
Tasks_Stack
,
1
,
10
)));
Append_Node_To_List
(
N
,
CTN
.
Declarations
(
Current_File
));
-- Add an enumerator corresponding to an INVALID server
-- entity to the entity list.
...
...
@@ -1564,6 +1572,8 @@ package body Ocarina.Backends.PO_HI_C.Deployment is
(
Make_Literal
(
CV
.
New_Int_Value
(
Task_Identifier
,
0
,
10
))));
Append_Node_To_List
(
N
,
Tasks_Enumerator_List
);
Task_Identifier
:=
Task_Identifier
+
1
;
Tasks_Stack
:=
Tasks_Stack
+
To_Bytes
(
Get_Thread_Stack_Size
(
E
));
end
if
;
if
Current_Device
/=
No_Node
...
...
@@ -1583,6 +1593,7 @@ package body Ocarina.Backends.PO_HI_C.Deployment is
(
Make_Literal
(
CV
.
New_Int_Value
(
Task_Identifier
,
0
,
10
))));
Append_Node_To_List
(
N
,
Tasks_Enumerator_List
);
Task_Identifier
:=
Task_Identifier
+
1
;
Tasks_Stack
:=
Tasks_Stack
+
To_Bytes
(
Get_Thread_Stack_Size
(
E
));
end
if
;
-- Get the Process parent of the thread
...
...
src/backends/ocarina-backends-po_hi_c-runtime.ads
View file @
bbc43558
...
...
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-201
5
ESA & ISAE. --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-201
6
ESA & ISAE. --
-- --
-- Ocarina is free software; you can redistribute it and/or modify under --
-- terms of the GNU General Public License as published by the Free Soft- --
...
...
@@ -180,6 +180,7 @@ package Ocarina.Backends.PO_HI_C.Runtime is
RE_Simulink_Init_Func
,
-- __PO_HI_SIMULINK_INIT
RE_Simulink_Model_Type
,
-- __PO_HI_SIMULINK_MODEL
RE_Nb_Tasks
,
-- __PO_HI_NB_TASKS
RE_Tasks_Stack
,
-- __PO_HI_TASKS_STACK
RE_In_Data_Inter_Process
,
RE_In_Data_Intra_Process
,
RE_Out_Data_Inter_Process
,
...
...
@@ -427,6 +428,7 @@ package Ocarina.Backends.PO_HI_C.Runtime is
RE_Bigendian
=>
RH_PO_HI_Transport
,
RE_Littleendian
=>
RH_PO_HI_Transport
,
RE_Nb_Tasks
=>
RH_Deployment
,
RE_Tasks_Stack
=>
RH_Deployment
,
RE_In_Data_Inter_Process
=>
RH_PO_HI_Types
,
RE_In_Data_Intra_Process
=>
RH_PO_HI_Types
,
RE_Out_Data_Inter_Process
=>
RH_PO_HI_Types
,
...
...
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