由于某些原因,这个EDF示例无法编译。我正在使用GNAT,我在Windows 8.1中尝试过,Debian没有结果。
with Ada.Real_Time, ada.Task_Identification,ada.Dispatching.EDF; use Ada.Real_Time, ada.Task_Identification,ada.Dispatching.EDF;
Procedure exemple_ordon is
Task tache_Periodique;
Task body tache_Periodique is
Echeance: Time_Span := Milliseconds(30); heure: Time;
Begin
heure:= Clock; Set_Deadline(Clock + Echeance);
Loop
heure := heure + Echeance;Delay_Until_And_Set_Deadline(heure,Echeance);
end loop;
End tache_Periodique;
Begin Null; End exemple_ordon ;
错误信息:
gnatmake -d -PC:UsersAwkdefault.gpr exemple_ordon.adb
gcc -c -g -O2 -I- -gnatA C:UsersAwkexemple_ordon.adb
Edf is not supported in this configuration
compilation abandoned
gnatmake: "C:UsersAwkexemple_ordon.adb" compilation error
消息Edf is not supported in this configuration
讲述了故事!
我无法访问任何受支持的GNAT版本,但是FSF GCC 4.9.0中的文件a-disedf.ads
(Ada.Dispatching.EDF
的规范)包含注释
-- This unit is not implemented in typical GNAT implementations that lie on
-- top of operating systems, because it is infeasible to implement in such
-- environments.
-- If a target environment provides appropriate support for this package,
-- then the Unimplemented_Unit pragma should be removed from this spec and
-- an appropriate body provided.
所以AdaCore可能会为他们的付费客户提供一些更实时的目标(例如VxWorks)的实现。
您是否可以访问AdaCore的学术课程(GAP)?
如果你真的需要EDF调度,Burns和Wellings的 Ada中的并发性有一个例子(我有平装本第二版);你可以在AbeBooks上便宜地买到。
如果你"只是"需要关于一般任务的信息,Ada信息交换所列出了几个来源。
在Ada中开发高完整性实时软件的许多人使用Ravenscar Profile。