Changeset 0ced77e9 in rtems
- Timestamp:
- 04/22/13 17:14:36 (9 years ago)
- Branches:
- 4.11, 5, master
- Children:
- ea123ca
- Parents:
- dfd1508
- git-author:
- Gedare Bloom <gedare@…> (04/22/13 17:14:36)
- git-committer:
- Gedare Bloom <gedare@…> (04/23/13 13:06:41)
- Files:
-
- 2 deleted
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
README
rdfd1508 r0ced77e9 1 Building RTEMS 2 ============== 3 See the file README.configure. 1 See the documentation manuals in doc/ with daily builds available online at 2 http://rtems.org/onlinedocs/doc-current/share/rtems/html/ and released builds 3 at http://www.rtems.org/onlinedocs/releases/ 4 4 5 Directory Overview 6 ================== 5 See the RTEMS Wiki at http://wiki.rtems.org/wiki/index.php/Main_Page 6 for community knowledge and tutorials. 7 7 8 This is the top level of the RTEMS directory structure. The following 9 is a description of the files and directories in this directory: 8 RTEMS Doxygen available at http://www.rtems.org/onlinedocs/doxygen/cpukit/html 10 9 11 INSTALL 12 Rudimentary installation instructions. For more detailed 13 information please see the Release Notes. The Postscript14 version of this manual can be found in the file15 c_or_ada/doc/relnotes.tgz.10 Get help on the mailing lists: 11 * For general-purpose questions related to using RTEMS, use the 12 rtems-users ml: http://www.rtems.org/mailman/listinfo/rtems-users 13 * For questions and discussion related to development of RTEMS, use the 14 rtems-devel ml: http://www.rtems.org/mailman/listinfo/rtems-devel 16 15 17 LICENSE18 Required legalese.19 20 README21 This file.22 23 c24 This directory contains the source code for the C25 implementation of RTEMS as well as the test suites, sample26 applications, Board Support Packages, Device Drivers, and27 support libraries.28 29 doc30 This directory contains the PDL for the RTEMS executive.31 32 Ada versus C33 ============34 35 There are two implementations of RTEMS in this source tree --36 in Ada and in C. These two implementations are functionally37 and structurally equivalent. The C implementation follows38 the packaging conventions and hierarchical nature of the Ada39 implementation. In addition, a style has been followed which40 allows one to easily find the corresponding Ada and C41 implementations.42 43 File names in C and code placement was carefully designed to insure44 a close mapping to the Ada implementation. The following file name45 extensions are used:46 47 .adb - Ada body48 .ads - Ada specification49 .adp - Ada body requiring preprocessing50 .inc - include file for .adp files51 52 .c - C body (non-inlined routines)53 .inl - C body (inlined routines)54 .h - C specification55 56 In the executive source, XYZ.c and XYZ.inl correspond directly to a57 single XYZ.adb or XYZ.adp file. A .h file corresponds directly to58 the .ads file. There are only a handful of .inc files in the59 Ada source and these are used to insure that the desired simple60 inline textual expansion is performed. This avoids scoping and61 calling convention side-effects in carefully constructed tests62 which usually test context switch behavior.63 64 In addition, in Ada code and data name references are always fully65 qualified as PACKAGE.NAME. In C, this convention is followed66 by having the package name as part of the name itself and using a67 capital letter to indicate the presence of a "." level. So we have68 PACKAGE.NAME in Ada and _Package_Name in C. The leading "_" in C69 is used to avoid naming conflicts between RTEMS and user variables.70 By using these conventions, one can easily compare the C and Ada71 implementations.72 73 The most noticeable difference between the C and Ada83 code is74 the inability to easily obtain a "typed pointer" in Ada83.75 Using the "&" operator in C yields a pointer with a specific type.76 The 'Address attribute is the closest feature in Ada83. This77 returns a System.Address and this must be coerced via Unchecked_Conversion78 into an access type of the desired type. It is easy to view79 System.Address as similar to a "void *" in C, but this is not the case.80 A "void *" can be assigned to any other pointer type without an81 explicit conversion.82 83 The solution adopted to this problem was to provide two routines for84 each access type in the Ada implementation -- one to convert from85 System.Address to the access type and another to go the opposite86 direction. This results in code which accomplishes the same thing87 as the corresponding C but it is easier to get lost in the clutter88 of the apparent subprogram invocations than the "less bulky"89 C equivalent.90 91 A related difference is the types which are only in Ada which are used92 for pointers to arrays. These types do not exist and are not needed93 in the C implementation.
Note: See TracChangeset
for help on using the changeset viewer.