Commit 9dd73496 authored by yoogx's avatar yoogx
Browse files

* Call Wait_Offset iff necessary

        * Make request local variable a static one
parent 79120519
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-2015 ESA & ISAE. -- -- Copyright (C) 2008-2009 Telecom ParisTech, 2010-2016 ESA & ISAE. --
-- -- -- --
-- Ocarina is free software; you can redistribute it and/or modify under -- -- 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- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -413,7 +413,8 @@ package body Ocarina.Backends.PO_HI_C.Activity is ...@@ -413,7 +413,8 @@ package body Ocarina.Backends.PO_HI_C.Activity is
(Defining_Identifier => (Defining_Identifier =>
Make_Defining_Identifier Make_Defining_Identifier
(Map_C_Variable_Name (F, Port_Request => True)), (Map_C_Variable_Name (F, Port_Request => True)),
Used_Type => RE (RE_Request_T)); Used_Type => RE (RE_Request_T),
Is_Static => True);
Append_Node_To_List (N, Declarations); Append_Node_To_List (N, Declarations);
Call_Parameters := New_List (CTN.K_Parameter_List); Call_Parameters := New_List (CTN.K_Parameter_List);
...@@ -845,7 +846,7 @@ package body Ocarina.Backends.PO_HI_C.Activity is ...@@ -845,7 +846,7 @@ package body Ocarina.Backends.PO_HI_C.Activity is
Make_List_Id Make_List_Id
(Make_Variable_Address (Make_Variable_Address
(Make_Defining_Identifier (VN (V_Offset))))), (Make_Defining_Identifier (VN (V_Offset))))),
WStatements); Statements);
end if; end if;
end Make_Wait_Offset; end Make_Wait_Offset;
...@@ -1240,8 +1241,6 @@ package body Ocarina.Backends.PO_HI_C.Activity is ...@@ -1240,8 +1241,6 @@ package body Ocarina.Backends.PO_HI_C.Activity is
-- behaviour of subprograms and does not have to worry -- behaviour of subprograms and does not have to worry
-- about sending and receiving ports. -- about sending and receiving ports.
Make_Wait_Offset;
-- Get IN ports values and dequeue them -- Get IN ports values and dequeue them
if Has_In_Ports (E) then if Has_In_Ports (E) then
...@@ -1348,6 +1347,10 @@ package body Ocarina.Backends.PO_HI_C.Activity is ...@@ -1348,6 +1347,10 @@ package body Ocarina.Backends.PO_HI_C.Activity is
N := CTU.Make_Call_Profile (RE (RE_Wait_Initialization), No_List); N := CTU.Make_Call_Profile (RE (RE_Wait_Initialization), No_List);
Append_Node_To_List (N, Statements); Append_Node_To_List (N, Statements);
-- Call __po_hi_wait_offset() iff necessary
Make_Wait_Offset;
-- Compute the next period after initialization, because -- Compute the next period after initialization, because
-- the period has passed after init. -- the period has passed after init.
......
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