精通
英语
和
开源
,
擅长
开发
与
培训
,
胸怀四海
第一信赖
锐英源精品开源心得,转载请注明:“锐英源www.wisestudy.cn,孙老师作品,电话13803810136。需要全文内容也请联系孙老师。
In RTLinux, real-time tasks are implemented as kernel modules, implemented in "C". RTLinux also provides support for the "C++" language. RTLinux以C语言开发,以内核级实现了实时任务处理。RTLinux还提供了对“c++”语言的支持。
Special care must be taken when writing kernel modules: a bug in a single task can make the whole system to hang or crash, since these modules are executed in the kernel memory space. "C" is a language widely used in low level programming because of its high efficiency, but it is also true that it is not a programmer friendly language: simply and error prone syntax, weak typed, no run-time cheking, etc.
编写内核模块时必须特别注意:一个单一的任务中的一个错误可以使整个系统中止或崩溃,因为这些模块执行在内核内存空间。“C”是一种广泛应用于低水平编程语言,因为它效率高,但它也确实不是一个程序员友好的语言:简单和容易出错的语法,弱类型,没有cheking运行程序,等等。
This is clearly an area where Ada can be of great help: Ada’s strong typing, consistency checking, robust syntax and readability, and the availability of high quality compilers, encourage the writing of correct software and allow to catch bugs early in the implementation. RTLGnat is a porting of GNAT Ada compiler that allows to write rtlinux modules in Ada language.
这显然是一个可以对Ada有很大帮助的领域:Ada是强类型的,一致性检查、健壮的语法和可读性,以及高质量编译器可用性,鼓励编写正确的软件,允许早期实现捕捉bug。RTLGnat移植的GNAT Ada编译器允许在Ada语言中写rtlinux模块。
The modules create by RTLGnat are loaded on the RTLinux Applications layer. The porting has been done using only the facilities already available in RTLinux. The base RTLinux API has not been modified.
通过RTLGnat创建的模块被加载在RTLinux的应用层。移植已经在RTLinux中完成的设施中被使用。基本RTLinux API没有被修改。
RTLGnat allows to load programs compiled in Ada 95 on RTLinux. RTLGnat允许加载程序在RTLinux Ada 95中编译。
A new kernel module, RT-Gnat Layer (RTGL), has been implemented with all the glue code required by both RTLinux and the upper layers of the ADA runtime support.
一个新的内核模块,RT-Gnat层(RTGL),实现了所有的粘贴代码所需的RTLinux和ADA运行时支持的上层。
On one side, the RTGL module exports the symbols (function and variable names) that are required by the Linux module loader (like init_module, cleanup_module, author, license and kernel version strings); and on the other side RTGL provides to the GNAT runtime support the required, but not provided by RTLinux, OS API functions like for example the malloc and free.
一方面,RTGL模块导出符号(函数和变量名)需要由Linux模块加载器(如init_module中,cleanup_module,作者,许可证和内核版本字符串);另一方面RTGL提供GNAT运行时支持所需的,但不是由RTLinux提供,例如像在malloc和自由的OS API函数。
Some of these functions of the RTGL has been taken from the OSKIT project and from the source code of GNU GCC 2.8.1. exported symbols. RTGL的一些功能已经从OSKIT项目和GNU GCC 2.8.1导出的符号的源代码中取出。。
Tests programs has been developed to check the following functionalities: 测试程序开发检查以下功能:
• Currently several test are being developed to obtain maximum achievable utilisation of an harmonic task set.
目前几个测试正在开发以获得协调任务集的最大可利用率。
• Some preliminary results show that the worst observed overhead in a task switch has been 20 microseconds.
一些初步结果表明,任务切换的最严重的观察值已经20微秒
Qualitatives 定性• Posix Tracer in RTLinux, implemented by Andres Terrasa, has been used to verify the operation of RTLGnat, and all the tests have been passed.
RTLinux中的Posix Tracer,通过执行Andres Terrasa,用于验证RTLGnat操作,所有的测试已经通过了。