Joel Sherrill 36799d4063 2002-11-26 Chris Johns <cjohns@cybertec.com.au>
* Makefile.am: Added sys/linker_set.h
	* kern/Makefile.am: Added kern_mib.c and kern_sysctl.c.
	* kern/uipc_socket.c: OID changed from KERN_SOMAXCONN to KIPC_SOMAXCONN.
	* kern/uipc_socket2.c: OID changed from KERN_MAXSOCKBUF to
	KIPC_MAXSOCKBUF.
	* net/if_ethersubr.c: FreeBSD 2.2.2 does not have a _net_link node
	while 5.0 does.
	* net/if_ppp.c: Removed the TEXT_SET define as these macros are
	now implemented.
	* net/rtsock.c: Enable sysctl support plus fix the bug with the
	lastest FreeBSD sysctl header file.
	* netinet/icmp_var.h: FreeBSD 2.2.2 does not have a _net_inet_icmp
	node while 5.0 does.
	* netinet/if_ether.c: FreeBSD 2.2.2 does not have a _net_link_ether
	node while 5.0 does.
	* netinet/igmp_var.h: FreeBSD 2.2.2 does not have a _net_inet_igmp
	node while 5.0 does.
	* netinet/in_pcb.c: Fixed the arguments to the sysctl call. Add
	inp_gencnt and ipi_count. These are used when listing connections.
	* netinet/in_pcb.h: Added counters to aid the listing of connections.
	* netinet/in_var.h: Provide the _net_inet_ip and _net_inet_raw nodes.
	* netinet/ip_fw.c: Disable the firewall sysctl calls.
	* netinet/tcp_subr.c: Merge tcp_pcblist from the lastest FreeBSD source.
	* netinet/tcp_var.h: Add structures needed by net-snmp to list
	connections.
	* netinet/udp_usrreq.c: Merged udp_pcblist from the lastest FreeBSD
	source.
	* netinet/udp_var.h: Added the sysctl id UDPCTL_PCBLIST. Used by
	net-snmp.
	* rtems_glue.c: Call sysctl_register_all when initialising the
	network stack to register all the sysctl calls. These are in the
	special sections and required an updated linker script.
	* rtems/rtems_syscall.c: Add the sysctl call.
	* sys/kernel.h: Use the lastest FreeBSD method of handling sysctl
	structures.  This now held in the sys/linker_set.h file.
	* sys/queue.h: This is from the lastest FreeBSD code with the circular
	code merged back in as it is not used in the lastest FreeBSD kernel.
	* sys/sysctl.h: The lastest sysctl. This was needed to use with the new
	linker set method. The FreeBSD 2.2.2 version has asm hacks. The lastest
	version of the FreeBSD does not have these hacks. It uses gcc attribute
	directives.
2003-01-03 18:09:57 +00:00
2000-02-08 18:36:21 +00:00
1997-04-22 16:50:29 +00:00
2000-02-08 18:36:21 +00:00

#
#  $Id$
#

Building RTEMS
==============
See the file README.configure.

Directory Overview
==================

This is the top level of the RTEMS directory structure.  The following 
is a description of the files and directories in this directory:

  INSTALL
    Rudimentary installation instructions.  For more detailed
    information please see the Release Notes.  The Postscript 
    version of this manual can be found in the file
    c_or_ada/doc/relnotes.tgz.

  LICENSE
    Required legalese.

  README
    This file.

  c
    This directory contains the source code for the C 
    implementation of RTEMS as well as the test suites, sample 
    applications, Board Support Packages, Device Drivers, and 
    support libraries.

  doc
    This directory contains the PDL for the RTEMS executive.

Ada versus C
============

There are two implementations of RTEMS in this source tree -- 
in Ada and in C.  These two implementations are functionally
and structurally equivalent.  The C implementation follows
the packaging conventions and hierarchical nature of the Ada 
implementation.  In addition, a style has been followed which 
allows one to easily find the corresponding Ada and C 
implementations.  

File names in C and code placement was carefully designed to insure
a close mapping to the Ada implementation.  The following file name 
extensions are used:

   .adb - Ada body
   .ads - Ada specification
   .adp - Ada body requiring preprocessing
   .inc - include file for .adp files

   .c   - C body (non-inlined routines)
   .inl - C body (inlined routines)
   .h   - C specification

In the executive source, XYZ.c and XYZ.inl correspond directly to a 
single XYZ.adb or XYZ.adp file.  A .h file corresponds directly to
the .ads file.  There are only a handful of .inc files in the 
Ada source and these are used to insure that the desired simple 
inline textual expansion is performed.  This avoids scoping and
calling convention side-effects in carefully constructed tests 
which usually test context switch behavior.

In addition, in Ada code and data name references are always fully
qualified as PACKAGE.NAME.  In C, this convention is followed 
by having the package name as part of the name itself and using a
capital letter to indicate the presence of a "." level.  So we have
PACKAGE.NAME in Ada and _Package_Name in C.  The leading "_" in C
is used to avoid naming conflicts between RTEMS and user variables.
By using these conventions, one can easily compare the C and Ada
implementations.

The most noticeable difference between the C and Ada83 code is 
the inability to easily obtain a "typed pointer" in Ada83.  
Using the "&" operator in C yields a pointer with a specific type.
The 'Address attribute is the closest feature in Ada83.  This
returns a System.Address and this must be coerced via Unchecked_Conversion
into an access type of the desired type.  It is easy to view 
System.Address as similar to a "void *" in C, but this is not the case.
A "void *" can be assigned to any other pointer type without an
explicit conversion.  

The solution adopted to this problem was to provide two routines for
each access type in the Ada implementation -- one to convert from
System.Address to the access type and another to go the opposite
direction.  This results in code which accomplishes the same thing
as the corresponding C but it is easier to get lost in the clutter
of the apparent subprogram invocations than the "less bulky"
C equivalent.

A related difference is the types which are only in Ada which are used 
for pointers to arrays.  These types do not exist and are not needed 
in the C implementation.
Description
RTEMS is a ​real-time executive in use by embedded systems applications around the world and beyond
Readme 126 MiB
Languages
C 93.9%
Assembly 3.4%
Ada 1.4%
Python 0.3%
HTML 0.3%
Other 0.4%