Commit d7dc76c2 authored by yoogx's avatar yoogx

* Job function of thread is now a procedure

        For openaadl/ocarina#132
parent 83ba4e8e
......@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2009 Telecom ParisTech, 2010-2015 ESA & ISAE. --
-- Copyright (C) 2009 Telecom ParisTech, 2010-2018 ESA & ISAE. --
-- --
-- PolyORB-HI is free software; you can redistribute it and/or modify under --
-- terms of the GNU General Public License as published by the Free Soft- --
......@@ -97,7 +97,7 @@ package body PolyORB_HI.Aperiodic_Task is
-- Execute the job
Error := Job (Port);
Job (Port, Error);
if Error /= Error_None then
Recover_Entrypoint;
......
......@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- Copyright (C) 2009 Telecom ParisTech, 2010-2015 ESA & ISAE. --
-- Copyright (C) 2009 Telecom ParisTech, 2010-2018 ESA & ISAE. --
-- --
-- PolyORB-HI is free software; you can redistribute it and/or modify under --
-- terms of the GNU General Public License as published by the Free Soft- --
......@@ -60,8 +60,10 @@ generic
Port : out Port_Type);
-- Blocks the next triggering of the thread
with function Job (Port : Port_Type) return PolyORB_HI.Errors.Error_Kind;
-- Procedure to call at each dispatch of the sporadic thread
with procedure Job
(Port : Port_Type;
Result : out PolyORB_HI.Errors.Error_Kind);
-- Procedure to call at each dispatch of the aperiodic thread
with procedure Activate_Entrypoint is null;
-- If given, the task run Activate_Entrypoint after the global
......
......@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2009 Telecom ParisTech, 2010-2015 ESA & ISAE. --
-- Copyright (C) 2009 Telecom ParisTech, 2010-2018 ESA & ISAE. --
-- --
-- PolyORB-HI is free software; you can redistribute it and/or modify under --
-- terms of the GNU General Public License as published by the Free Soft- --
......@@ -76,7 +76,7 @@ package body PolyORB_HI.Background_Task is
+ Entity_Image (Entity)
+ ": Run job"));
Error := Job;
Job (Error);
if Error /= Error_None then
Recover_Entrypoint;
......
......@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- Copyright (C) 2009 Telecom ParisTech, 2010-2015 ESA & ISAE. --
-- Copyright (C) 2009 Telecom ParisTech, 2010-2018 ESA & ISAE. --
-- --
-- PolyORB-HI is free software; you can redistribute it and/or modify under --
-- terms of the GNU General Public License as published by the Free Soft- --
......@@ -45,7 +45,7 @@ generic
Task_Stack_Size : in Natural;
-- Task stack size
with function Job return PolyORB_HI.Errors.Error_Kind;
with procedure Job (Result : out PolyORB_HI.Errors.Error_Kind);
-- Procedure to call at each dispatch of the sporadic thread
with procedure Activate_Entrypoint is null;
......
......@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2013-2015 ESA & ISAE. --
-- Copyright (C) 2013-2018 ESA & ISAE. --
-- --
-- PolyORB-HI is free software; you can redistribute it and/or modify under --
-- terms of the GNU General Public License as published by the Free Soft- --
......@@ -131,7 +131,7 @@ package body PolyORB_HI.ISR_Task is
-- Execute the job
Error := Job;
Job (Error);
if Error /= Error_None then
Recover_Entrypoint;
......
......@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- Copyright (C) 2013-2015 ESA & ISAE. --
-- Copyright (C) 2013-2018 ESA & ISAE. --
-- --
-- PolyORB-HI is free software; you can redistribute it and/or modify under --
-- terms of the GNU General Public License as published by the Free Soft- --
......@@ -29,13 +29,11 @@
-- --
------------------------------------------------------------------------------
-- Sporadic threads are a little bit more complicated that periodic
-- ones. Their behaviour can be summerized as follows:
-- ISR threads are interrupt handlers.
-- BEGIN LOOP
-- 1 - Blocks until a triggering event comes
-- 2 - Do the job
-- 3 - Sleep to guarantee that minimal inter-arrival time elapses
-- END LOOP
with System;
......@@ -65,7 +63,7 @@ generic
Interrupt_Identifier : in Ada.Interrupts.Interrupt_ID := SIGUSR1;
with function Job return PolyORB_HI.Errors.Error_Kind;
with procedure Job (Result : out PolyORB_HI.Errors.Error_Kind);
-- Parameterless procedure executed by the periodic task
with procedure Activate_Entrypoint is null;
......
......@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2014-2015 ESA & ISAE. --
-- Copyright (C) 2014-2018 ESA & ISAE. --
-- --
-- PolyORB-HI is free software; you can redistribute it and/or modify under --
-- terms of the GNU General Public License as published by the Free Soft- --
......@@ -75,7 +75,7 @@ package body PolyORB_HI.Null_Task is
+ Entity_Image (Entity)
+ ": Run job"));
Error := Job;
Job (Error);
if Error /= Error_None then
Recover_Entrypoint;
......
......@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- Copyright (C) 2014-2015 ESA & ISAE. --
-- Copyright (C) 2014-2018 ESA & ISAE. --
-- --
-- PolyORB-HI is free software; you can redistribute it and/or modify under --
-- terms of the GNU General Public License as published by the Free Soft- --
......@@ -58,8 +58,8 @@ generic
Task_Deadline : in Ada.Real_Time.Time_Span;
-- Task deadline
with function Job return PolyORB_HI.Errors.Error_Kind;
-- Procedure to call at each dispatch of the sporadic thread
with procedure Job (Result : out PolyORB_HI.Errors.Error_Kind);
-- Procedure to call at each dispatch of the "null" thread
with procedure Activate_Entrypoint is null;
-- If given, the task run Activate_Entrypoint after the global
......
......@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2007-2009 Telecom ParisTech, 2010-2017 ESA & ISAE. --
-- Copyright (C) 2007-2009 Telecom ParisTech, 2010-2018 ESA & ISAE. --
-- --
-- PolyORB-HI is free software; you can redistribute it and/or modify under --
-- terms of the GNU General Public License as published by the Free Soft- --
......@@ -90,7 +90,7 @@ package body PolyORB_HI.Periodic_Task is
-- Execute the task's job
Error := Job;
Job (Error);
if Error /= Error_None then
Recover_Entrypoint;
......
......@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- Copyright (C) 2007-2009 Telecom ParisTech, 2010-2015 ESA & ISAE. --
-- Copyright (C) 2007-2009 Telecom ParisTech, 2010-2018 ESA & ISAE. --
-- --
-- PolyORB-HI is free software; you can redistribute it and/or modify under --
-- terms of the GNU General Public License as published by the Free Soft- --
......@@ -28,6 +28,7 @@
-- (taste-users@lists.tuxfamily.org) --
-- --
------------------------------------------------------------------------------
pragma SPARK_Mode (Off);
-- Define a periodic task that executes a Job
......@@ -56,7 +57,7 @@ generic
Task_Stack_Size : in Natural;
-- Task stack size
with function Job return PolyORB_HI.Errors.Error_Kind;
with procedure Job (Return_Value : out PolyORB_HI.Errors.Error_Kind);
-- Parameterless procedure executed by the periodic task
with procedure Activate_Entrypoint is null;
......
......@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2007-2009 Telecom ParisTech, 2010-2015 ESA & ISAE. --
-- Copyright (C) 2007-2009 Telecom ParisTech, 2010-2018 ESA & ISAE. --
-- --
-- PolyORB-HI is free software; you can redistribute it and/or modify under --
-- terms of the GNU General Public License as published by the Free Soft- --
......@@ -109,7 +109,7 @@ package body PolyORB_HI.Sporadic_Task is
-- Execute the job
Error := Job (Port);
Job (Port, Error);
if Error /= Error_None then
Recover_Entrypoint;
......
......@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- Copyright (C) 2007-2009 Telecom ParisTech, 2010-2015 ESA & ISAE. --
-- Copyright (C) 2007-2009 Telecom ParisTech, 2010-2018 ESA & ISAE. --
-- --
-- PolyORB-HI is free software; you can redistribute it and/or modify under --
-- terms of the GNU General Public License as published by the Free Soft- --
......@@ -71,7 +71,9 @@ generic
Port : out Port_Type);
-- Blocks the next triggering of the thread
with function Job (Port : Port_Type) return PolyORB_HI.Errors.Error_Kind;
with procedure Job
(Port : Port_Type;
Result : out PolyORB_HI.Errors.Error_Kind);
-- Procedure to call at each dispatch of the sporadic thread
with procedure Activate_Entrypoint is null;
......
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